diff --git a/engine/src/android/nbproject/project.xml b/engine/src/android/nbproject/project.xml
deleted file mode 100644
index 124bfda04..000000000
--- a/engine/src/android/nbproject/project.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-
-
- org.netbeans.modules.ant.freeform
-
-
- jMonkeyEngine3 - Android
-
-
-
- jMonkeyEngine3 - Android
-
- ../../build.xml
-
-
-
-
- java
- .
- MacRoman
-
-
-
-
-
- jar
-
-
-
- clean
-
-
-
- javadoc
-
-
-
- run
-
-
-
- clean
- jar
-
-
-
-
-
-
- .
-
-
- ${ant.script}
-
-
-
-
-
-
-
-
-
-
-
-
-
- .
- ../../lib/android/android.jar:../../dist/jMonkeyEngine3.jar
- 1.5
-
-
-
-
diff --git a/engine/src/bullet/com/jme3/bullet/collision/shapes/infos/ChildCollisionShape.java b/engine/src/bullet/com/jme3/bullet/collision/shapes/infos/ChildCollisionShape.java
deleted file mode 100644
index cc721d0f1..000000000
--- a/engine/src/bullet/com/jme3/bullet/collision/shapes/infos/ChildCollisionShape.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-package com.jme3.bullet.collision.shapes.infos;
-
-import com.jme3.bullet.collision.shapes.BoxCollisionShape;
-import com.jme3.bullet.collision.shapes.CollisionShape;
-import com.jme3.export.InputCapsule;
-import com.jme3.export.JmeExporter;
-import com.jme3.export.JmeImporter;
-import com.jme3.export.OutputCapsule;
-import com.jme3.export.Savable;
-import com.jme3.math.Matrix3f;
-import com.jme3.math.Vector3f;
-import java.io.IOException;
-
-/**
- *
- * @author normenhansen
- */
-public class ChildCollisionShape implements Savable {
-
- public Vector3f location;
- public Matrix3f rotation;
- public CollisionShape shape;
-
- public ChildCollisionShape() {
- }
-
- public ChildCollisionShape(Vector3f location, Matrix3f rotation, CollisionShape shape) {
- this.location = location;
- this.rotation = rotation;
- this.shape = shape;
- }
-
- public void write(JmeExporter ex) throws IOException {
- OutputCapsule capsule = ex.getCapsule(this);
- capsule.write(location, "location", new Vector3f());
- capsule.write(rotation, "rotation", new Matrix3f());
- capsule.write(shape, "shape", new BoxCollisionShape(new Vector3f(1, 1, 1)));
- }
-
- public void read(JmeImporter im) throws IOException {
- InputCapsule capsule = im.getCapsule(this);
- location = (Vector3f) capsule.readSavable("location", new Vector3f());
- rotation = (Matrix3f) capsule.readSavable("rotation", new Matrix3f());
- shape = (CollisionShape) capsule.readSavable("shape", new BoxCollisionShape(new Vector3f(1, 1, 1)));
- }
-}
diff --git a/engine/src/bullet/com/jme3/bullet/control/CharacterControl.java b/engine/src/bullet/com/jme3/bullet/control/CharacterControl.java
deleted file mode 100644
index 2acac5316..000000000
--- a/engine/src/bullet/com/jme3/bullet/control/CharacterControl.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-package com.jme3.bullet.control;
-
-import com.jme3.bullet.PhysicsSpace;
-import com.jme3.bullet.collision.shapes.CollisionShape;
-import com.jme3.bullet.objects.PhysicsCharacter;
-import com.jme3.export.InputCapsule;
-import com.jme3.export.JmeExporter;
-import com.jme3.export.JmeImporter;
-import com.jme3.export.OutputCapsule;
-import com.jme3.math.Quaternion;
-import com.jme3.math.Vector3f;
-import com.jme3.renderer.RenderManager;
-import com.jme3.renderer.ViewPort;
-import com.jme3.scene.Spatial;
-import com.jme3.scene.control.Control;
-import java.io.IOException;
-
-/**
- *
- * @author normenhansen
- */
-public class CharacterControl extends PhysicsCharacter implements PhysicsControl {
-
- protected Spatial spatial;
- protected boolean enabled = true;
- protected boolean added = false;
- protected PhysicsSpace space = null;
- protected Vector3f viewDirection = new Vector3f(Vector3f.UNIT_Z);
- protected boolean useViewDirection = true;
- protected boolean applyLocal = false;
-
- public CharacterControl() {
- }
-
- public CharacterControl(CollisionShape shape, float stepHeight) {
- super(shape, stepHeight);
- }
-
- public boolean isApplyPhysicsLocal() {
- return applyLocal;
- }
-
- /**
- * When set to true, the physics coordinates will be applied to the local
- * translation of the Spatial
- * @param applyPhysicsLocal
- */
- public void setApplyPhysicsLocal(boolean applyPhysicsLocal) {
- applyLocal = applyPhysicsLocal;
- }
-
- private Vector3f getSpatialTranslation() {
- if (applyLocal) {
- return spatial.getLocalTranslation();
- }
- return spatial.getWorldTranslation();
- }
-
- public Control cloneForSpatial(Spatial spatial) {
- CharacterControl control = new CharacterControl(collisionShape, stepHeight);
- control.setCcdMotionThreshold(getCcdMotionThreshold());
- control.setCcdSweptSphereRadius(getCcdSweptSphereRadius());
- control.setCollideWithGroups(getCollideWithGroups());
- control.setCollisionGroup(getCollisionGroup());
- control.setFallSpeed(getFallSpeed());
- control.setGravity(getGravity());
- control.setJumpSpeed(getJumpSpeed());
- control.setMaxSlope(getMaxSlope());
- control.setPhysicsLocation(getPhysicsLocation());
- control.setUpAxis(getUpAxis());
- control.setApplyPhysicsLocal(isApplyPhysicsLocal());
-
- control.setSpatial(spatial);
- return control;
- }
-
- public void setSpatial(Spatial spatial) {
- if (getUserObject() == null || getUserObject() == this.spatial) {
- setUserObject(spatial);
- }
- this.spatial = spatial;
- if (spatial == null) {
- if (getUserObject() == spatial) {
- setUserObject(null);
- }
- return;
- }
- setPhysicsLocation(getSpatialTranslation());
- }
-
- public void setEnabled(boolean enabled) {
- this.enabled = enabled;
- if (space != null) {
- if (enabled && !added) {
- if (spatial != null) {
- warp(getSpatialTranslation());
- }
- space.addCollisionObject(this);
- added = true;
- } else if (!enabled && added) {
- space.removeCollisionObject(this);
- added = false;
- }
- }
- }
-
- public boolean isEnabled() {
- return enabled;
- }
-
- public void setViewDirection(Vector3f vec) {
- viewDirection.set(vec);
- }
-
- public Vector3f getViewDirection() {
- return viewDirection;
- }
-
- public boolean isUseViewDirection() {
- return useViewDirection;
- }
-
- public void setUseViewDirection(boolean viewDirectionEnabled) {
- this.useViewDirection = viewDirectionEnabled;
- }
-
- public void update(float tpf) {
- if (enabled && spatial != null) {
- Quaternion localRotationQuat = spatial.getLocalRotation();
- Vector3f localLocation = spatial.getLocalTranslation();
- if (!applyLocal && spatial.getParent() != null) {
- getPhysicsLocation(localLocation);
- localLocation.subtractLocal(spatial.getParent().getWorldTranslation());
- localLocation.divideLocal(spatial.getParent().getWorldScale());
- tmp_inverseWorldRotation.set(spatial.getParent().getWorldRotation()).inverseLocal().multLocal(localLocation);
- spatial.setLocalTranslation(localLocation);
-
- if (useViewDirection) {
- localRotationQuat.lookAt(viewDirection, Vector3f.UNIT_Y);
- spatial.setLocalRotation(localRotationQuat);
- }
- } else {
- spatial.setLocalTranslation(getPhysicsLocation());
- localRotationQuat.lookAt(viewDirection, Vector3f.UNIT_Y);
- spatial.setLocalRotation(localRotationQuat);
- }
- }
- }
-
- public void render(RenderManager rm, ViewPort vp) {
- if (enabled && space != null && space.getDebugManager() != null) {
- if (debugShape == null) {
- attachDebugShape(space.getDebugManager());
- }
- debugShape.setLocalTranslation(getPhysicsLocation());
- debugShape.updateLogicalState(0);
- debugShape.updateGeometricState();
- rm.renderScene(debugShape, vp);
- }
- }
-
- public void setPhysicsSpace(PhysicsSpace space) {
- if (space == null) {
- if (this.space != null) {
- this.space.removeCollisionObject(this);
- added = false;
- }
- } else {
- if (this.space == space) {
- return;
- }
- space.addCollisionObject(this);
- added = true;
- }
- this.space = space;
- }
-
- public PhysicsSpace getPhysicsSpace() {
- return space;
- }
-
- @Override
- public void write(JmeExporter ex) throws IOException {
- super.write(ex);
- OutputCapsule oc = ex.getCapsule(this);
- oc.write(enabled, "enabled", true);
- oc.write(applyLocal, "applyLocalPhysics", false);
- oc.write(useViewDirection, "viewDirectionEnabled", true);
- oc.write(viewDirection, "viewDirection", new Vector3f(Vector3f.UNIT_Z));
- oc.write(spatial, "spatial", null);
- }
-
- @Override
- public void read(JmeImporter im) throws IOException {
- super.read(im);
- InputCapsule ic = im.getCapsule(this);
- enabled = ic.readBoolean("enabled", true);
- useViewDirection = ic.readBoolean("viewDirectionEnabled", true);
- viewDirection = (Vector3f) ic.readSavable("viewDirection", new Vector3f(Vector3f.UNIT_Z));
- applyLocal = ic.readBoolean("applyLocalPhysics", false);
- spatial = (Spatial) ic.readSavable("spatial", null);
- setUserObject(spatial);
- }
-}
diff --git a/engine/src/bullet/com/jme3/bullet/control/GhostControl.java b/engine/src/bullet/com/jme3/bullet/control/GhostControl.java
deleted file mode 100644
index 99e598480..000000000
--- a/engine/src/bullet/com/jme3/bullet/control/GhostControl.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-package com.jme3.bullet.control;
-
-import com.jme3.bullet.PhysicsSpace;
-import com.jme3.bullet.collision.shapes.CollisionShape;
-import com.jme3.bullet.objects.PhysicsGhostObject;
-import com.jme3.export.InputCapsule;
-import com.jme3.export.JmeExporter;
-import com.jme3.export.JmeImporter;
-import com.jme3.export.OutputCapsule;
-import com.jme3.math.Quaternion;
-import com.jme3.math.Vector3f;
-import com.jme3.renderer.RenderManager;
-import com.jme3.renderer.ViewPort;
-import com.jme3.scene.Spatial;
-import com.jme3.scene.control.Control;
-import java.io.IOException;
-
-/**
- * A GhostControl moves with the spatial it is attached to and can be used to check
- * overlaps with other physics objects (e.g. aggro radius).
- * @author normenhansen
- */
-public class GhostControl extends PhysicsGhostObject implements PhysicsControl {
-
- protected Spatial spatial;
- protected boolean enabled = true;
- protected boolean added = false;
- protected PhysicsSpace space = null;
- protected boolean applyLocal = false;
-
- public GhostControl() {
- }
-
- public GhostControl(CollisionShape shape) {
- super(shape);
- }
-
- public boolean isApplyPhysicsLocal() {
- return applyLocal;
- }
-
- /**
- * When set to true, the physics coordinates will be applied to the local
- * translation of the Spatial
- * @param applyPhysicsLocal
- */
- public void setApplyPhysicsLocal(boolean applyPhysicsLocal) {
- applyLocal = applyPhysicsLocal;
- }
-
- private Vector3f getSpatialTranslation() {
- if (applyLocal) {
- return spatial.getLocalTranslation();
- }
- return spatial.getWorldTranslation();
- }
-
- private Quaternion getSpatialRotation() {
- if (applyLocal) {
- return spatial.getLocalRotation();
- }
- return spatial.getWorldRotation();
- }
-
- public Control cloneForSpatial(Spatial spatial) {
- GhostControl control = new GhostControl(collisionShape);
- control.setCcdMotionThreshold(getCcdMotionThreshold());
- control.setCcdSweptSphereRadius(getCcdSweptSphereRadius());
- control.setCollideWithGroups(getCollideWithGroups());
- control.setCollisionGroup(getCollisionGroup());
- control.setPhysicsLocation(getPhysicsLocation());
- control.setPhysicsRotation(getPhysicsRotationMatrix());
- control.setApplyPhysicsLocal(isApplyPhysicsLocal());
-
- control.setSpatial(spatial);
- return control;
- }
-
- public void setSpatial(Spatial spatial) {
- if (getUserObject() == null || getUserObject() == this.spatial) {
- setUserObject(spatial);
- }
- this.spatial = spatial;
- if (spatial == null) {
- if (getUserObject() == spatial) {
- setUserObject(null);
- }
- return;
- }
- setPhysicsLocation(getSpatialTranslation());
- setPhysicsRotation(getSpatialRotation());
- }
-
- public void setEnabled(boolean enabled) {
- this.enabled = enabled;
- if (space != null) {
- if (enabled && !added) {
- if (spatial != null) {
- setPhysicsLocation(getSpatialTranslation());
- setPhysicsRotation(getSpatialRotation());
- }
- space.addCollisionObject(this);
- added = true;
- } else if (!enabled && added) {
- space.removeCollisionObject(this);
- added = false;
- }
- }
- }
-
- public boolean isEnabled() {
- return enabled;
- }
-
- public void update(float tpf) {
- if (!enabled) {
- return;
- }
- setPhysicsLocation(getSpatialTranslation());
- setPhysicsRotation(getSpatialRotation());
- }
-
- public void render(RenderManager rm, ViewPort vp) {
- if (enabled && space != null && space.getDebugManager() != null) {
- if (debugShape == null) {
- attachDebugShape(space.getDebugManager());
- }
- debugShape.setLocalTranslation(spatial.getWorldTranslation());
- debugShape.setLocalRotation(spatial.getWorldRotation());
- debugShape.updateLogicalState(0);
- debugShape.updateGeometricState();
- rm.renderScene(debugShape, vp);
- }
- }
-
- public void setPhysicsSpace(PhysicsSpace space) {
- if (space == null) {
- if (this.space != null) {
- this.space.removeCollisionObject(this);
- added = false;
- }
- } else {
- if (this.space == space) {
- return;
- }
- space.addCollisionObject(this);
- added = true;
- }
- this.space = space;
- }
-
- public PhysicsSpace getPhysicsSpace() {
- return space;
- }
-
- @Override
- public void write(JmeExporter ex) throws IOException {
- super.write(ex);
- OutputCapsule oc = ex.getCapsule(this);
- oc.write(enabled, "enabled", true);
- oc.write(applyLocal, "applyLocalPhysics", false);
- oc.write(spatial, "spatial", null);
- }
-
- @Override
- public void read(JmeImporter im) throws IOException {
- super.read(im);
- InputCapsule ic = im.getCapsule(this);
- enabled = ic.readBoolean("enabled", true);
- spatial = (Spatial) ic.readSavable("spatial", null);
- applyLocal = ic.readBoolean("applyLocalPhysics", false);
- setUserObject(spatial);
- }
-}
diff --git a/engine/src/bullet/com/jme3/bullet/control/KinematicRagdollControl.java b/engine/src/bullet/com/jme3/bullet/control/KinematicRagdollControl.java
deleted file mode 100644
index 3470153c8..000000000
--- a/engine/src/bullet/com/jme3/bullet/control/KinematicRagdollControl.java
+++ /dev/null
@@ -1,873 +0,0 @@
-/*
- * Copyright (c) 2009-2010 jMonkeyEngine
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, 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 com.jme3.bullet.control;
-
-import com.jme3.bullet.control.ragdoll.RagdollPreset;
-import com.jme3.bullet.control.ragdoll.HumanoidRagdollPreset;
-import com.jme3.animation.AnimControl;
-import com.jme3.animation.Bone;
-import com.jme3.animation.Skeleton;
-import com.jme3.animation.SkeletonControl;
-import com.jme3.asset.AssetManager;
-import com.jme3.bullet.PhysicsSpace;
-import com.jme3.bullet.collision.PhysicsCollisionEvent;
-import com.jme3.bullet.collision.PhysicsCollisionListener;
-import com.jme3.bullet.collision.PhysicsCollisionObject;
-import com.jme3.bullet.collision.RagdollCollisionListener;
-import com.jme3.bullet.collision.shapes.BoxCollisionShape;
-import com.jme3.bullet.collision.shapes.HullCollisionShape;
-import com.jme3.bullet.control.ragdoll.RagdollUtils;
-import com.jme3.bullet.joints.SixDofJoint;
-import com.jme3.bullet.objects.PhysicsRigidBody;
-import com.jme3.export.JmeExporter;
-import com.jme3.export.JmeImporter;
-import com.jme3.math.Quaternion;
-import com.jme3.math.Vector3f;
-import com.jme3.renderer.RenderManager;
-import com.jme3.renderer.ViewPort;
-import com.jme3.scene.Node;
-import com.jme3.scene.Spatial;
-import com.jme3.scene.control.Control;
-import com.jme3.util.TempVars;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**This control is still a WIP, use it at your own risk
- * To use this control you need a model with an AnimControl and a SkeletonControl.
- * This should be the case if you imported an animated model from Ogre or blender.
- * Note enabling/disabling the control add/removes it from the physic space
- *
- * This control creates collision shapes for each bones of the skeleton when you call spatial.addControl(ragdollControl).
- *
- *
The shape is HullCollision shape based on the vertices associated with each bone and based on a tweakable weight threshold (see setWeightThreshold)
- *
If you don't want each bone to be a collision shape, you can specify what bone to use by using the addBoneName method
- * By using this method, bone that are not used to create a shape, are "merged" to their parent to create the collision shape.
- *
- *
- *
- *
- *There are 2 modes for this control :
- *
- *
The kinematic modes :
- * this is the default behavior, this means that the collision shapes of the body are able to interact with physics enabled objects.
- * in this mode physic shapes follow the moovements of the animated skeleton (for example animated by a key framed animation)
- * this mode is enabled by calling setKinematicMode();
- *
- *
The ragdoll modes :
- * To enable this behavior, you need to call setRagdollMode() method.
- * In this mode the charater is entirely controled by physics, so it will fall under the gravity and move if any force is applied to it.
- *
- *
- *
- *
- * @author Normen Hansen and Rémy Bouquet (Nehon)
- */
-public class KinematicRagdollControl implements PhysicsControl, PhysicsCollisionListener {
-
- protected static final Logger logger = Logger.getLogger(KinematicRagdollControl.class.getName());
- protected Map boneLinks = new HashMap();
- protected Skeleton skeleton;
- protected PhysicsSpace space;
- protected boolean enabled = true;
- protected boolean debug = false;
- protected PhysicsRigidBody baseRigidBody;
- protected float weightThreshold = -1.0f;
- protected Spatial targetModel;
- protected Vector3f initScale;
- protected Mode mode = Mode.Kinetmatic;
- protected boolean blendedControl = false;
- protected float blendTime = 1.0f;
- protected float blendStart = 0.0f;
- protected List listeners;
- protected float eventDispatchImpulseThreshold = 10;
- protected RagdollPreset preset = new HumanoidRagdollPreset();
- protected Set boneList = new TreeSet();
- protected Vector3f modelPosition = new Vector3f();
- protected Quaternion modelRotation = new Quaternion();
- protected float rootMass = 15;
- protected float totalMass = 0;
- protected boolean added = false;
-
- public static enum Mode {
-
- Kinetmatic,
- Ragdoll
- }
-
- protected class PhysicsBoneLink {
-
- protected Bone bone;
- protected Quaternion initalWorldRotation;
- protected SixDofJoint joint;
- protected PhysicsRigidBody rigidBody;
- protected Quaternion startBlendingRot = new Quaternion();
- protected Vector3f startBlendingPos = new Vector3f();
- }
-
- /**
- * contruct a KinematicRagdollControl
- */
- public KinematicRagdollControl() {
- }
-
- public KinematicRagdollControl(float weightThreshold) {
- this.weightThreshold = weightThreshold;
- }
-
- public KinematicRagdollControl(RagdollPreset preset, float weightThreshold) {
- this.preset = preset;
- this.weightThreshold = weightThreshold;
- }
-
- public KinematicRagdollControl(RagdollPreset preset) {
- this.preset = preset;
- }
-
- public void update(float tpf) {
- if (!enabled) {
- return;
- }
- TempVars vars = TempVars.get();
-
- Quaternion tmpRot1 = vars.quat1;
- Quaternion tmpRot2 = vars.quat2;
-
- //if the ragdoll has the control of the skeleton, we update each bone with its position in physic world space.
- if (mode == mode.Ragdoll && targetModel.getLocalTranslation().equals(modelPosition)) {
- for (PhysicsBoneLink link : boneLinks.values()) {
-
- Vector3f position = vars.vect1;
-
- //retrieving bone position in physic world space
- Vector3f p = link.rigidBody.getMotionState().getWorldLocation();
- //transforming this position with inverse transforms of the model
- targetModel.getWorldTransform().transformInverseVector(p, position);
-
- //retrieving bone rotation in physic world space
- Quaternion q = link.rigidBody.getMotionState().getWorldRotationQuat();
-
- //multiplying this rotation by the initialWorld rotation of the bone,
- //then transforming it with the inverse world rotation of the model
- tmpRot1.set(q).multLocal(link.initalWorldRotation);
- tmpRot2.set(targetModel.getWorldRotation()).inverseLocal().mult(tmpRot1, tmpRot1);
- tmpRot1.normalizeLocal();
-
- //if the bone is the root bone, we apply the physic's transform to the model, so its position and rotation are correctly updated
- if (link.bone.getParent() == null) {
-
- //offsetting the physic's position/rotation by the root bone inverse model space position/rotaion
- modelPosition.set(p).subtractLocal(link.bone.getWorldBindPosition());
- targetModel.getParent().getWorldTransform().transformInverseVector(modelPosition, modelPosition);
- modelRotation.set(q).multLocal(tmpRot2.set(link.bone.getWorldBindRotation()).inverseLocal());
-
-
- //applying transforms to the model
- targetModel.setLocalTranslation(modelPosition);
-
- targetModel.setLocalRotation(modelRotation);
-
- //Applying computed transforms to the bone
- link.bone.setUserTransformsWorld(position, tmpRot1);
-
- } else {
- //if boneList is empty, this means that every bone in the ragdoll has a collision shape,
- //so we just update the bone position
- if (boneList.isEmpty()) {
- link.bone.setUserTransformsWorld(position, tmpRot1);
- } else {
- //boneList is not empty, this means some bones of the skeleton might not be associated with a collision shape.
- //So we update them recusively
- RagdollUtils.setTransform(link.bone, position, tmpRot1, false, boneList);
- }
- }
- }
- } else {
- //the ragdoll does not have the controll, so the keyframed animation updates the physic position of the physic bonces
- for (PhysicsBoneLink link : boneLinks.values()) {
-
- Vector3f position = vars.vect1;
-
- //if blended control this means, keyframed animation is updating the skeleton,
- //but to allow smooth transition, we blend this transformation with the saved position of the ragdoll
- if (blendedControl) {
- Vector3f position2 = vars.vect2;
- //initializing tmp vars with the start position/rotation of the ragdoll
- position.set(link.startBlendingPos);
- tmpRot1.set(link.startBlendingRot);
-
- //interpolating between ragdoll position/rotation and keyframed position/rotation
- tmpRot2.set(tmpRot1).nlerp(link.bone.getModelSpaceRotation(), blendStart / blendTime);
- position2.set(position).interpolate(link.bone.getModelSpacePosition(), blendStart / blendTime);
- tmpRot1.set(tmpRot2);
- position.set(position2);
-
- //updating bones transforms
- if (boneList.isEmpty()) {
- //we ensure we have the control to update the bone
- link.bone.setUserControl(true);
- link.bone.setUserTransformsWorld(position, tmpRot1);
- //we give control back to the key framed animation.
- link.bone.setUserControl(false);
- } else {
- RagdollUtils.setTransform(link.bone, position, tmpRot1, true, boneList);
- }
-
- }
- //setting skeleton transforms to the ragdoll
- matchPhysicObjectToBone(link, position, tmpRot1);
- modelPosition.set(targetModel.getLocalTranslation());
-
- }
-
- //time control for blending
- if (blendedControl) {
- blendStart += tpf;
- if (blendStart > blendTime) {
- blendedControl = false;
- }
- }
- }
- vars.release();
-
- }
-
- /**
- * Set the transforms of a rigidBody to match the transforms of a bone.
- * this is used to make the ragdoll follow the skeleton motion while in Kinematic mode
- * @param link the link containing the bone and the rigidBody
- * @param position just a temp vector for position
- * @param tmpRot1 just a temp quaternion for rotation
- */
- private void matchPhysicObjectToBone(PhysicsBoneLink link, Vector3f position, Quaternion tmpRot1) {
- //computing position from rotation and scale
- targetModel.getWorldTransform().transformVector(link.bone.getModelSpacePosition(), position);
-
- //computing rotation
- tmpRot1.set(link.bone.getModelSpaceRotation()).multLocal(link.bone.getWorldBindInverseRotation());
- targetModel.getWorldRotation().mult(tmpRot1, tmpRot1);
- tmpRot1.normalizeLocal();
-
- //updating physic location/rotation of the physic bone
- link.rigidBody.setPhysicsLocation(position);
- link.rigidBody.setPhysicsRotation(tmpRot1);
-
- }
-
- public Control cloneForSpatial(Spatial spatial) {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- /**
- * rebuild the ragdoll
- * this is useful if you applied scale on the ragdoll after it's been initialized
- */
- public void reBuild() {
- setSpatial(targetModel);
- addToPhysicsSpace();
- }
-
- public void setSpatial(Spatial model) {
- if (model == null) {
- removeFromPhysicsSpace();
- clearData();
- return;
- }
- targetModel = model;
- Node parent = model.getParent();
-
-
- Vector3f initPosition = model.getLocalTranslation().clone();
- Quaternion initRotation = model.getLocalRotation().clone();
- initScale = model.getLocalScale().clone();
-
- model.removeFromParent();
- model.setLocalTranslation(Vector3f.ZERO);
- model.setLocalRotation(Quaternion.IDENTITY);
- model.setLocalScale(1);
- //HACK ALERT change this
- //I remove the skeletonControl and readd it to the spatial to make sure it's after the ragdollControl in the stack
- //Find a proper way to order the controls.
- SkeletonControl sc = model.getControl(SkeletonControl.class);
- model.removeControl(sc);
- model.addControl(sc);
- //----
-
- removeFromPhysicsSpace();
- clearData();
- // put into bind pose and compute bone transforms in model space
- // maybe dont reset to ragdoll out of animations?
- scanSpatial(model);
-
-
- if (parent != null) {
- parent.attachChild(model);
-
- }
- model.setLocalTranslation(initPosition);
- model.setLocalRotation(initRotation);
- model.setLocalScale(initScale);
-
- logger.log(Level.INFO, "Created physics ragdoll for skeleton {0}", skeleton);
- }
-
- /**
- * Add a bone name to this control
- * Using this method you can specify which bones of the skeleton will be used to build the collision shapes.
- * @param name
- */
- public void addBoneName(String name) {
- boneList.add(name);
- }
-
- private void scanSpatial(Spatial model) {
- AnimControl animControl = model.getControl(AnimControl.class);
- Map> pointsMap = null;
- if (weightThreshold == -1.0f) {
- pointsMap = RagdollUtils.buildPointMap(model);
- }
-
- skeleton = animControl.getSkeleton();
- skeleton.resetAndUpdate();
- for (int i = 0; i < skeleton.getRoots().length; i++) {
- Bone childBone = skeleton.getRoots()[i];
- if (childBone.getParent() == null) {
- logger.log(Level.INFO, "Found root bone in skeleton {0}", skeleton);
- baseRigidBody = new PhysicsRigidBody(new BoxCollisionShape(Vector3f.UNIT_XYZ.mult(0.1f)), 1);
- baseRigidBody.setKinematic(mode == Mode.Kinetmatic);
- boneRecursion(model, childBone, baseRigidBody, 1, pointsMap);
- }
- }
- }
-
- private void boneRecursion(Spatial model, Bone bone, PhysicsRigidBody parent, int reccount, Map> pointsMap) {
- PhysicsRigidBody parentShape = parent;
- if (boneList.isEmpty() || boneList.contains(bone.getName())) {
-
- PhysicsBoneLink link = new PhysicsBoneLink();
- link.bone = bone;
-
- //creating the collision shape
- HullCollisionShape shape = null;
- if (pointsMap != null) {
- //build a shape for the bone, using the vertices that are most influenced by this bone
- shape = RagdollUtils.makeShapeFromPointMap(pointsMap, RagdollUtils.getBoneIndices(link.bone, skeleton, boneList), initScale, link.bone.getModelSpacePosition());
- } else {
- //build a shape for the bone, using the vertices associated with this bone with a weight above the threshold
- shape = RagdollUtils.makeShapeFromVerticeWeights(model, RagdollUtils.getBoneIndices(link.bone, skeleton, boneList), initScale, link.bone.getModelSpacePosition(), weightThreshold);
- }
-
- PhysicsRigidBody shapeNode = new PhysicsRigidBody(shape, rootMass / (float) reccount);
-
- shapeNode.setKinematic(mode == Mode.Kinetmatic);
- totalMass += rootMass / (float) reccount;
-
- link.rigidBody = shapeNode;
- link.initalWorldRotation = bone.getModelSpaceRotation().clone();
-
- if (parent != null) {
- //get joint position for parent
- Vector3f posToParent = new Vector3f();
- if (bone.getParent() != null) {
- bone.getModelSpacePosition().subtract(bone.getParent().getModelSpacePosition(), posToParent).multLocal(initScale);
- }
-
- SixDofJoint joint = new SixDofJoint(parent, shapeNode, posToParent, new Vector3f(0, 0, 0f), true);
- preset.setupJointForBone(bone.getName(), joint);
-
- link.joint = joint;
- joint.setCollisionBetweenLinkedBodys(false);
- }
- boneLinks.put(bone.getName(), link);
- shapeNode.setUserObject(link);
- parentShape = shapeNode;
- }
-
- for (Iterator it = bone.getChildren().iterator(); it.hasNext();) {
- Bone childBone = it.next();
- boneRecursion(model, childBone, parentShape, reccount + 1, pointsMap);
- }
- }
-
- /**
- * Set the joint limits for the joint between the given bone and its parent.
- * This method can't work before attaching the control to a spatial
- * @param boneName the name of the bone
- * @param maxX the maximum rotation on the x axis (in radians)
- * @param minX the minimum rotation on the x axis (in radians)
- * @param maxY the maximum rotation on the y axis (in radians)
- * @param minY the minimum rotation on the z axis (in radians)
- * @param maxZ the maximum rotation on the z axis (in radians)
- * @param minZ the minimum rotation on the z axis (in radians)
- */
- public void setJointLimit(String boneName, float maxX, float minX, float maxY, float minY, float maxZ, float minZ) {
- PhysicsBoneLink link = boneLinks.get(boneName);
- if (link != null) {
- RagdollUtils.setJointLimit(link.joint, maxX, minX, maxY, minY, maxZ, minZ);
- } else {
- logger.log(Level.WARNING, "Not joint was found for bone {0}. make sure you call spatial.addControl(ragdoll) before setting joints limit", boneName);
- }
- }
-
- /**
- * Return the joint between the given bone and its parent.
- * This return null if it's called before attaching the control to a spatial
- * @param boneName the name of the bone
- * @return the joint between the given bone and its parent
- */
- public SixDofJoint getJoint(String boneName) {
- PhysicsBoneLink link = boneLinks.get(boneName);
- if (link != null) {
- return link.joint;
- } else {
- logger.log(Level.WARNING, "Not joint was found for bone {0}. make sure you call spatial.addControl(ragdoll) before setting joints limit", boneName);
- return null;
- }
- }
-
- private void clearData() {
- boneLinks.clear();
- baseRigidBody = null;
- }
-
- private void addToPhysicsSpace() {
- if (space == null) {
- return;
- }
- if (baseRigidBody != null) {
- space.add(baseRigidBody);
- added = true;
- }
- for (Iterator it = boneLinks.values().iterator(); it.hasNext();) {
- PhysicsBoneLink physicsBoneLink = it.next();
- if (physicsBoneLink.rigidBody != null) {
- space.add(physicsBoneLink.rigidBody);
- if (physicsBoneLink.joint != null) {
- space.add(physicsBoneLink.joint);
-
- }
- added = true;
- }
- }
- }
-
- protected void removeFromPhysicsSpace() {
- if (space == null) {
- return;
- }
- if (baseRigidBody != null) {
- space.remove(baseRigidBody);
- }
- for (Iterator it = boneLinks.values().iterator(); it.hasNext();) {
- PhysicsBoneLink physicsBoneLink = it.next();
- if (physicsBoneLink.joint != null) {
- space.remove(physicsBoneLink.joint);
- if (physicsBoneLink.rigidBody != null) {
- space.remove(physicsBoneLink.rigidBody);
- }
- }
- }
- added = false;
- }
-
- /**
- * enable or disable the control
- * note that if enabled is true and that the physic space has been set on the ragdoll, the ragdoll is added to the physic space
- * if enabled is false the ragdoll is removed from physic space.
- * @param enabled
- */
- public void setEnabled(boolean enabled) {
- if (this.enabled == enabled) {
- return;
- }
- this.enabled = enabled;
- if (!enabled && space != null) {
- removeFromPhysicsSpace();
- } else if (enabled && space != null) {
- addToPhysicsSpace();
- }
- }
-
- /**
- * returns true if the control is enabled
- * @return
- */
- public boolean isEnabled() {
- return enabled;
- }
-
- protected void attachDebugShape(AssetManager manager) {
- for (Iterator it = boneLinks.values().iterator(); it.hasNext();) {
- PhysicsBoneLink physicsBoneLink = it.next();
- physicsBoneLink.rigidBody.createDebugShape(manager);
- }
- debug = true;
- }
-
- protected void detachDebugShape() {
- for (Iterator it = boneLinks.values().iterator(); it.hasNext();) {
- PhysicsBoneLink physicsBoneLink = it.next();
- physicsBoneLink.rigidBody.detachDebugShape();
- }
- debug = false;
- }
-
- /**
- * For internal use only
- * specific render for the ragdoll(if debugging)
- * @param rm
- * @param vp
- */
- public void render(RenderManager rm, ViewPort vp) {
- if (enabled && space != null && space.getDebugManager() != null) {
- if (!debug) {
- attachDebugShape(space.getDebugManager());
- }
- for (Iterator it = boneLinks.values().iterator(); it.hasNext();) {
- PhysicsBoneLink physicsBoneLink = it.next();
- Spatial debugShape = physicsBoneLink.rigidBody.debugShape();
- if (debugShape != null) {
- debugShape.setLocalTranslation(physicsBoneLink.rigidBody.getMotionState().getWorldLocation());
- debugShape.setLocalRotation(physicsBoneLink.rigidBody.getMotionState().getWorldRotationQuat());
- debugShape.updateGeometricState();
- rm.renderScene(debugShape, vp);
- }
- }
- }
- }
-
- /**
- * set the physic space to this ragdoll
- * @param space
- */
- public void setPhysicsSpace(PhysicsSpace space) {
- if (space == null) {
- removeFromPhysicsSpace();
- this.space = space;
- } else {
- if (this.space == space) {
- return;
- }
- this.space = space;
- addToPhysicsSpace();
- this.space.addCollisionListener(this);
- }
- }
-
- /**
- * returns the physic space
- * @return
- */
- public PhysicsSpace getPhysicsSpace() {
- return space;
- }
-
- /**
- * serialize this control
- * @param ex
- * @throws IOException
- */
- public void write(JmeExporter ex) throws IOException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- /**
- * de-serialize this control
- * @param im
- * @throws IOException
- */
- public void read(JmeImporter im) throws IOException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- /**
- * For internal use only
- * callback for collisionevent
- * @param event
- */
- public void collision(PhysicsCollisionEvent event) {
- PhysicsCollisionObject objA = event.getObjectA();
- PhysicsCollisionObject objB = event.getObjectB();
-
- //excluding collisions that involve 2 parts of the ragdoll
- if (event.getNodeA() == null && event.getNodeB() == null) {
- return;
- }
-
- //discarding low impulse collision
- if (event.getAppliedImpulse() < eventDispatchImpulseThreshold) {
- return;
- }
-
- boolean hit = false;
- Bone hitBone = null;
- PhysicsCollisionObject hitObject = null;
-
- //Computing which bone has been hit
- if (objA.getUserObject() instanceof PhysicsBoneLink) {
- PhysicsBoneLink link = (PhysicsBoneLink) objA.getUserObject();
- if (link != null) {
- hit = true;
- hitBone = link.bone;
- hitObject = objB;
- }
- }
-
- if (objB.getUserObject() instanceof PhysicsBoneLink) {
- PhysicsBoneLink link = (PhysicsBoneLink) objB.getUserObject();
- if (link != null) {
- hit = true;
- hitBone = link.bone;
- hitObject = objA;
-
- }
- }
-
- //dispatching the event if the ragdoll has been hit
- if (hit && listeners != null) {
- for (RagdollCollisionListener listener : listeners) {
- listener.collide(hitBone, hitObject, event);
- }
- }
-
- }
-
- /**
- * Enable or disable the ragdoll behaviour.
- * if ragdollEnabled is true, the character motion will only be powerd by physics
- * else, the characted will be animated by the keyframe animation,
- * but will be able to physically interact with its physic environnement
- * @param ragdollEnabled
- */
- protected void setMode(Mode mode) {
- this.mode = mode;
- AnimControl animControl = targetModel.getControl(AnimControl.class);
- animControl.setEnabled(mode == Mode.Kinetmatic);
-
- baseRigidBody.setKinematic(mode == Mode.Kinetmatic);
- TempVars vars = TempVars.get();
-
- for (PhysicsBoneLink link : boneLinks.values()) {
- link.rigidBody.setKinematic(mode == Mode.Kinetmatic);
- if (mode == Mode.Ragdoll) {
- Quaternion tmpRot1 = vars.quat1;
- Vector3f position = vars.vect1;
- //making sure that the ragdoll is at the correct place.
- matchPhysicObjectToBone(link, position, tmpRot1);
- }
-
- }
- vars.release();
-
- for (Bone bone : skeleton.getRoots()) {
- RagdollUtils.setUserControl(bone, mode == Mode.Ragdoll);
- }
- }
-
- /**
- * Smoothly blend from Ragdoll mode to Kinematic mode
- * This is useful to blend ragdoll actual position to a keyframe animation for example
- * @param blendTime the blending time between ragdoll to anim.
- */
- public void blendToKinematicMode(float blendTime) {
- if (mode == Mode.Kinetmatic) {
- return;
- }
- blendedControl = true;
- this.blendTime = blendTime;
- mode = Mode.Kinetmatic;
- AnimControl animControl = targetModel.getControl(AnimControl.class);
- animControl.setEnabled(true);
-
-
- TempVars vars = TempVars.get();
- for (PhysicsBoneLink link : boneLinks.values()) {
-
- Vector3f p = link.rigidBody.getMotionState().getWorldLocation();
- Vector3f position = vars.vect1;
-
- targetModel.getWorldTransform().transformInverseVector(p, position);
-
- Quaternion q = link.rigidBody.getMotionState().getWorldRotationQuat();
- Quaternion q2 = vars.quat1;
- Quaternion q3 = vars.quat2;
-
- q2.set(q).multLocal(link.initalWorldRotation).normalizeLocal();
- q3.set(targetModel.getWorldRotation()).inverseLocal().mult(q2, q2);
- q2.normalizeLocal();
- link.startBlendingPos.set(position);
- link.startBlendingRot.set(q2);
- link.rigidBody.setKinematic(true);
- }
- vars.release();
-
- for (Bone bone : skeleton.getRoots()) {
- RagdollUtils.setUserControl(bone, false);
- }
-
- blendStart = 0;
- }
-
- /**
- * Set the control into Kinematic mode
- * In theis mode, the collision shapes follow the movements of the skeleton,
- * and can interact with physical environement
- */
- public void setKinematicMode() {
- if (mode != Mode.Kinetmatic) {
- setMode(Mode.Kinetmatic);
- }
- }
-
- /**
- * Sets the control into Ragdoll mode
- * The skeleton is entirely controlled by physics.
- */
- public void setRagdollMode() {
- if (mode != Mode.Ragdoll) {
- setMode(Mode.Ragdoll);
- }
- }
-
- /**
- * retruns the mode of this control
- * @return
- */
- public Mode getMode() {
- return mode;
- }
-
- /**
- * add a
- * @param listener
- */
- public void addCollisionListener(RagdollCollisionListener listener) {
- if (listeners == null) {
- listeners = new ArrayList();
- }
- listeners.add(listener);
- }
-
- public void setRootMass(float rootMass) {
- this.rootMass = rootMass;
- }
-
- public float getTotalMass() {
- return totalMass;
- }
-
- public float getWeightThreshold() {
- return weightThreshold;
- }
-
- public void setWeightThreshold(float weightThreshold) {
- this.weightThreshold = weightThreshold;
- }
-
- public float getEventDispatchImpulseThreshold() {
- return eventDispatchImpulseThreshold;
- }
-
- public void setEventDispatchImpulseThreshold(float eventDispatchImpulseThreshold) {
- this.eventDispatchImpulseThreshold = eventDispatchImpulseThreshold;
- }
-
- /**
- * Set the CcdMotionThreshold of all the bone's rigidBodies of the ragdoll
- * @see PhysicsRigidBody#setCcdMotionThreshold(float)
- * @param value
- */
- public void setCcdMotionThreshold(float value) {
- for (PhysicsBoneLink link : boneLinks.values()) {
- link.rigidBody.setCcdMotionThreshold(value);
- }
- }
-
- /**
- * Set the CcdSweptSphereRadius of all the bone's rigidBodies of the ragdoll
- * @see PhysicsRigidBody#setCcdSweptSphereRadius(float)
- * @param value
- */
- public void setCcdSweptSphereRadius(float value) {
- for (PhysicsBoneLink link : boneLinks.values()) {
- link.rigidBody.setCcdSweptSphereRadius(value);
- }
- }
-
- /**
- * Set the CcdMotionThreshold of the given bone's rigidBodies of the ragdoll
- * @see PhysicsRigidBody#setCcdMotionThreshold(float)
- * @param value
- * @deprecated use getBoneRigidBody(String BoneName).setCcdMotionThreshold(float) instead
- */
- @Deprecated
- public void setBoneCcdMotionThreshold(String boneName, float value) {
- PhysicsBoneLink link = boneLinks.get(boneName);
- if (link != null) {
- link.rigidBody.setCcdMotionThreshold(value);
- }
- }
-
- /**
- * Set the CcdSweptSphereRadius of the given bone's rigidBodies of the ragdoll
- * @see PhysicsRigidBody#setCcdSweptSphereRadius(float)
- * @param value
- * @deprecated use getBoneRigidBody(String BoneName).setCcdSweptSphereRadius(float) instead
- */
- @Deprecated
- public void setBoneCcdSweptSphereRadius(String boneName, float value) {
- PhysicsBoneLink link = boneLinks.get(boneName);
- if (link != null) {
- link.rigidBody.setCcdSweptSphereRadius(value);
- }
- }
-
- /**
- * return the rigidBody associated to the given bone
- * @param boneName the name of the bone
- * @return the associated rigidBody.
- */
- public PhysicsRigidBody getBoneRigidBody(String boneName) {
- PhysicsBoneLink link = boneLinks.get(boneName);
- if (link != null) {
- return link.rigidBody;
- }
- return null;
- }
-}
diff --git a/engine/src/bullet/com/jme3/bullet/control/PhysicsControl.java b/engine/src/bullet/com/jme3/bullet/control/PhysicsControl.java
deleted file mode 100644
index ba6515789..000000000
--- a/engine/src/bullet/com/jme3/bullet/control/PhysicsControl.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-package com.jme3.bullet.control;
-
-import com.jme3.bullet.PhysicsSpace;
-import com.jme3.scene.control.Control;
-
-/**
- *
- * @author normenhansen
- */
-public interface PhysicsControl extends Control {
-
- public void setPhysicsSpace(PhysicsSpace space);
-
- public PhysicsSpace getPhysicsSpace();
-
- /**
- * The physics object is removed from the physics space when the control
- * is disabled. When the control is enabled again the physics object is
- * moved to the current location of the spatial and then added to the physics
- * space. This allows disabling/enabling physics to move the spatial freely.
- * @param state
- */
- public void setEnabled(boolean state);
-}
diff --git a/engine/src/bullet/com/jme3/bullet/control/RigidBodyControl.java b/engine/src/bullet/com/jme3/bullet/control/RigidBodyControl.java
deleted file mode 100644
index be40b58c3..000000000
--- a/engine/src/bullet/com/jme3/bullet/control/RigidBodyControl.java
+++ /dev/null
@@ -1,266 +0,0 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-package com.jme3.bullet.control;
-
-import com.jme3.bullet.PhysicsSpace;
-import com.jme3.bullet.collision.shapes.BoxCollisionShape;
-import com.jme3.bullet.collision.shapes.CollisionShape;
-import com.jme3.bullet.collision.shapes.SphereCollisionShape;
-import com.jme3.bullet.objects.PhysicsRigidBody;
-import com.jme3.bullet.util.CollisionShapeFactory;
-import com.jme3.export.InputCapsule;
-import com.jme3.export.JmeExporter;
-import com.jme3.export.JmeImporter;
-import com.jme3.export.OutputCapsule;
-import com.jme3.math.Quaternion;
-import com.jme3.math.Vector3f;
-import com.jme3.renderer.RenderManager;
-import com.jme3.renderer.ViewPort;
-import com.jme3.scene.Geometry;
-import com.jme3.scene.Mesh;
-import com.jme3.scene.Node;
-import com.jme3.scene.Spatial;
-import com.jme3.scene.control.Control;
-import com.jme3.scene.shape.Box;
-import com.jme3.scene.shape.Sphere;
-import java.io.IOException;
-
-/**
- *
- * @author normenhansen
- */
-public class RigidBodyControl extends PhysicsRigidBody implements PhysicsControl {
-
- protected Spatial spatial;
- protected boolean enabled = true;
- protected boolean added = false;
- protected PhysicsSpace space = null;
- protected boolean kinematicSpatial = true;
-
- public RigidBodyControl() {
- }
-
- /**
- * When using this constructor, the CollisionShape for the RigidBody is generated
- * automatically when the Control is added to a Spatial.
- * @param mass When not 0, a HullCollisionShape is generated, otherwise a MeshCollisionShape is used. For geometries with box or sphere meshes the proper box or sphere collision shape is used.
- */
- public RigidBodyControl(float mass) {
- this.mass = mass;
- }
-
- /**
- * Creates a new PhysicsNode with the supplied collision shape and mass 1
- * @param child
- * @param shape
- */
- public RigidBodyControl(CollisionShape shape) {
- super(shape);
- }
-
- public RigidBodyControl(CollisionShape shape, float mass) {
- super(shape, mass);
- }
-
- public Control cloneForSpatial(Spatial spatial) {
- RigidBodyControl control = new RigidBodyControl(collisionShape, mass);
- control.setAngularFactor(getAngularFactor());
- control.setAngularSleepingThreshold(getAngularSleepingThreshold());
- control.setCcdMotionThreshold(getCcdMotionThreshold());
- control.setCcdSweptSphereRadius(getCcdSweptSphereRadius());
- control.setCollideWithGroups(getCollideWithGroups());
- control.setCollisionGroup(getCollisionGroup());
- control.setDamping(getLinearDamping(), getAngularDamping());
- control.setFriction(getFriction());
- control.setGravity(getGravity());
- control.setKinematic(isKinematic());
- control.setKinematicSpatial(isKinematicSpatial());
- control.setLinearSleepingThreshold(getLinearSleepingThreshold());
- control.setPhysicsLocation(getPhysicsLocation(null));
- control.setPhysicsRotation(getPhysicsRotationMatrix(null));
- control.setRestitution(getRestitution());
-
- if (mass > 0) {
- control.setAngularVelocity(getAngularVelocity());
- control.setLinearVelocity(getLinearVelocity());
- }
- control.setApplyPhysicsLocal(isApplyPhysicsLocal());
-
- control.setSpatial(spatial);
- return control;
- }
-
- public void setSpatial(Spatial spatial) {
- if (getUserObject() == null || getUserObject() == this.spatial) {
- setUserObject(spatial);
- }
- this.spatial = spatial;
- if (spatial == null) {
- if (getUserObject() == spatial) {
- setUserObject(null);
- }
- spatial = null;
- collisionShape = null;
- return;
- }
- if (collisionShape == null) {
- createCollisionShape();
- rebuildRigidBody();
- }
- setPhysicsLocation(getSpatialTranslation());
- setPhysicsRotation(getSpatialRotation());
- }
-
- protected void createCollisionShape() {
- if (spatial == null) {
- return;
- }
- if (spatial instanceof Geometry) {
- Geometry geom = (Geometry) spatial;
- Mesh mesh = geom.getMesh();
- if (mesh instanceof Sphere) {
- collisionShape = new SphereCollisionShape(((Sphere) mesh).getRadius());
- return;
- } else if (mesh instanceof Box) {
- collisionShape = new BoxCollisionShape(new Vector3f(((Box) mesh).getXExtent(), ((Box) mesh).getYExtent(), ((Box) mesh).getZExtent()));
- return;
- }
- }
- if (mass > 0) {
- collisionShape = CollisionShapeFactory.createDynamicMeshShape(spatial);
- } else {
- collisionShape = CollisionShapeFactory.createMeshShape(spatial);
- }
- }
-
- public void setEnabled(boolean enabled) {
- this.enabled = enabled;
- if (space != null) {
- if (enabled && !added) {
- if (spatial != null) {
- setPhysicsLocation(getSpatialTranslation());
- setPhysicsRotation(getSpatialRotation());
- }
- space.addCollisionObject(this);
- added = true;
- } else if (!enabled && added) {
- space.removeCollisionObject(this);
- added = false;
- }
- }
- }
-
- public boolean isEnabled() {
- return enabled;
- }
-
- /**
- * Checks if this control is in kinematic spatial mode.
- * @return true if the spatial location is applied to this kinematic rigidbody
- */
- public boolean isKinematicSpatial() {
- return kinematicSpatial;
- }
-
- /**
- * Sets this control to kinematic spatial mode so that the spatials transform will
- * be applied to the rigidbody in kinematic mode, defaults to true.
- * @param kinematicSpatial
- */
- public void setKinematicSpatial(boolean kinematicSpatial) {
- this.kinematicSpatial = kinematicSpatial;
- }
-
- public boolean isApplyPhysicsLocal() {
- return motionState.isApplyPhysicsLocal();
- }
-
- /**
- * When set to true, the physics coordinates will be applied to the local
- * translation of the Spatial instead of the world traslation.
- * @param applyPhysicsLocal
- */
- public void setApplyPhysicsLocal(boolean applyPhysicsLocal) {
- motionState.setApplyPhysicsLocal(applyPhysicsLocal);
- }
-
- private Vector3f getSpatialTranslation(){
- if(motionState.isApplyPhysicsLocal()){
- return spatial.getLocalTranslation();
- }
- return spatial.getWorldTranslation();
- }
-
- private Quaternion getSpatialRotation(){
- if(motionState.isApplyPhysicsLocal()){
- return spatial.getLocalRotation();
- }
- return spatial.getWorldRotation();
- }
-
- public void update(float tpf) {
- if (enabled && spatial != null) {
- if (isKinematic() && kinematicSpatial) {
- super.setPhysicsLocation(getSpatialTranslation());
- super.setPhysicsRotation(getSpatialRotation());
- } else {
- getMotionState().applyTransform(spatial);
- }
- }
- }
-
- public void render(RenderManager rm, ViewPort vp) {
- if (enabled && space != null && space.getDebugManager() != null) {
- if (debugShape == null) {
- attachDebugShape(space.getDebugManager());
- }
- //TODO: using spatial traslation/rotation..
- debugShape.setLocalTranslation(spatial.getWorldTranslation());
- debugShape.setLocalRotation(spatial.getWorldRotation());
- debugShape.updateLogicalState(0);
- debugShape.updateGeometricState();
- rm.renderScene(debugShape, vp);
- }
- }
-
- public void setPhysicsSpace(PhysicsSpace space) {
- if (space == null) {
- if (this.space != null) {
- this.space.removeCollisionObject(this);
- added = false;
- }
- } else {
- if(this.space==space) return;
- space.addCollisionObject(this);
- added = true;
- }
- this.space = space;
- }
-
- public PhysicsSpace getPhysicsSpace() {
- return space;
- }
-
- @Override
- public void write(JmeExporter ex) throws IOException {
- super.write(ex);
- OutputCapsule oc = ex.getCapsule(this);
- oc.write(enabled, "enabled", true);
- oc.write(motionState.isApplyPhysicsLocal(), "applyLocalPhysics", false);
- oc.write(kinematicSpatial, "kinematicSpatial", true);
- oc.write(spatial, "spatial", null);
- }
-
- @Override
- public void read(JmeImporter im) throws IOException {
- super.read(im);
- InputCapsule ic = im.getCapsule(this);
- enabled = ic.readBoolean("enabled", true);
- kinematicSpatial = ic.readBoolean("kinematicSpatial", true);
- spatial = (Spatial) ic.readSavable("spatial", null);
- motionState.setApplyPhysicsLocal(ic.readBoolean("applyLocalPhysics", false));
- setUserObject(spatial);
- }
-}
diff --git a/engine/src/bullet/com/jme3/bullet/control/VehicleControl.java b/engine/src/bullet/com/jme3/bullet/control/VehicleControl.java
deleted file mode 100644
index 4e6f416e4..000000000
--- a/engine/src/bullet/com/jme3/bullet/control/VehicleControl.java
+++ /dev/null
@@ -1,270 +0,0 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-package com.jme3.bullet.control;
-
-import com.jme3.bullet.PhysicsSpace;
-import com.jme3.bullet.collision.shapes.CollisionShape;
-import com.jme3.bullet.joints.PhysicsJoint;
-import com.jme3.bullet.objects.PhysicsVehicle;
-import com.jme3.bullet.objects.VehicleWheel;
-import com.jme3.export.InputCapsule;
-import com.jme3.export.JmeExporter;
-import com.jme3.export.JmeImporter;
-import com.jme3.export.OutputCapsule;
-import com.jme3.math.Quaternion;
-import com.jme3.math.Vector3f;
-import com.jme3.renderer.RenderManager;
-import com.jme3.renderer.ViewPort;
-import com.jme3.scene.Geometry;
-import com.jme3.scene.Node;
-import com.jme3.scene.Spatial;
-import com.jme3.scene.control.Control;
-import com.jme3.scene.debug.Arrow;
-import java.io.IOException;
-import java.util.Iterator;
-
-/**
- *
- * @author normenhansen
- */
-public class VehicleControl extends PhysicsVehicle implements PhysicsControl {
-
- protected Spatial spatial;
- protected boolean enabled = true;
- protected PhysicsSpace space = null;
- protected boolean added = false;
-
- public VehicleControl() {
- }
-
- /**
- * Creates a new PhysicsNode with the supplied collision shape
- * @param child
- * @param shape
- */
- public VehicleControl(CollisionShape shape) {
- super(shape);
- }
-
- public VehicleControl(CollisionShape shape, float mass) {
- super(shape, mass);
- }
-
- public boolean isApplyPhysicsLocal() {
- return motionState.isApplyPhysicsLocal();
- }
-
- /**
- * When set to true, the physics coordinates will be applied to the local
- * translation of the Spatial
- * @param applyPhysicsLocal
- */
- public void setApplyPhysicsLocal(boolean applyPhysicsLocal) {
- motionState.setApplyPhysicsLocal(applyPhysicsLocal);
- for (Iterator it = wheels.iterator(); it.hasNext();) {
- VehicleWheel vehicleWheel = it.next();
- vehicleWheel.setApplyLocal(applyPhysicsLocal);
- }
- }
-
- private Vector3f getSpatialTranslation(){
- if(motionState.isApplyPhysicsLocal()){
- return spatial.getLocalTranslation();
- }
- return spatial.getWorldTranslation();
- }
-
- private Quaternion getSpatialRotation(){
- if(motionState.isApplyPhysicsLocal()){
- return spatial.getLocalRotation();
- }
- return spatial.getWorldRotation();
- }
-
- public Control cloneForSpatial(Spatial spatial) {
- VehicleControl control = new VehicleControl(collisionShape, mass);
- control.setAngularFactor(getAngularFactor());
- control.setAngularSleepingThreshold(getAngularSleepingThreshold());
- control.setAngularVelocity(getAngularVelocity());
- control.setCcdMotionThreshold(getCcdMotionThreshold());
- control.setCcdSweptSphereRadius(getCcdSweptSphereRadius());
- control.setCollideWithGroups(getCollideWithGroups());
- control.setCollisionGroup(getCollisionGroup());
- control.setDamping(getLinearDamping(), getAngularDamping());
- control.setFriction(getFriction());
- control.setGravity(getGravity());
- control.setKinematic(isKinematic());
- control.setLinearSleepingThreshold(getLinearSleepingThreshold());
- control.setLinearVelocity(getLinearVelocity());
- control.setPhysicsLocation(getPhysicsLocation());
- control.setPhysicsRotation(getPhysicsRotationMatrix());
- control.setRestitution(getRestitution());
-
- control.setFrictionSlip(getFrictionSlip());
- control.setMaxSuspensionTravelCm(getMaxSuspensionTravelCm());
- control.setSuspensionStiffness(getSuspensionStiffness());
- control.setSuspensionCompression(tuning.suspensionCompression);
- control.setSuspensionDamping(tuning.suspensionDamping);
- control.setMaxSuspensionForce(getMaxSuspensionForce());
-
- for (Iterator it = wheels.iterator(); it.hasNext();) {
- VehicleWheel wheel = it.next();
- VehicleWheel newWheel = control.addWheel(wheel.getLocation(), wheel.getDirection(), wheel.getAxle(), wheel.getRestLength(), wheel.getRadius(), wheel.isFrontWheel());
- newWheel.setFrictionSlip(wheel.getFrictionSlip());
- newWheel.setMaxSuspensionTravelCm(wheel.getMaxSuspensionTravelCm());
- newWheel.setSuspensionStiffness(wheel.getSuspensionStiffness());
- newWheel.setWheelsDampingCompression(wheel.getWheelsDampingCompression());
- newWheel.setWheelsDampingRelaxation(wheel.getWheelsDampingRelaxation());
- newWheel.setMaxSuspensionForce(wheel.getMaxSuspensionForce());
-
- //TODO: bad way finding children!
- if (spatial instanceof Node) {
- Node node = (Node) spatial;
- Spatial wheelSpat = node.getChild(wheel.getWheelSpatial().getName());
- if (wheelSpat != null) {
- newWheel.setWheelSpatial(wheelSpat);
- }
- }
- }
- control.setApplyPhysicsLocal(isApplyPhysicsLocal());
-
- control.setSpatial(spatial);
- return control;
- }
-
- public void setSpatial(Spatial spatial) {
- if (getUserObject() == null || getUserObject() == this.spatial) {
- setUserObject(spatial);
- }
- this.spatial = spatial;
- if (spatial == null) {
- if (getUserObject() == spatial) {
- setUserObject(null);
- }
- this.spatial = null;
- this.collisionShape = null;
- return;
- }
- setPhysicsLocation(getSpatialTranslation());
- setPhysicsRotation(getSpatialRotation());
- }
-
- public void setEnabled(boolean enabled) {
- this.enabled = enabled;
- if (space != null) {
- if (enabled && !added) {
- if(spatial!=null){
- setPhysicsLocation(getSpatialTranslation());
- setPhysicsRotation(getSpatialRotation());
- }
- space.addCollisionObject(this);
- added = true;
- } else if (!enabled && added) {
- space.removeCollisionObject(this);
- added = false;
- }
- }
- }
-
- public boolean isEnabled() {
- return enabled;
- }
-
- public void update(float tpf) {
- if (enabled && spatial != null) {
- if (getMotionState().applyTransform(spatial)) {
- spatial.getWorldTransform();
- applyWheelTransforms();
- }
- } else if (enabled) {
- applyWheelTransforms();
- }
- }
-
- @Override
- protected Spatial getDebugShape() {
- return super.getDebugShape();
- }
-
- public void render(RenderManager rm, ViewPort vp) {
- if (enabled && space != null && space.getDebugManager() != null) {
- if (debugShape == null) {
- attachDebugShape(space.getDebugManager());
- }
- Node debugNode = (Node) debugShape;
- debugShape.setLocalTranslation(spatial.getWorldTranslation());
- debugShape.setLocalRotation(spatial.getWorldRotation());
- int i = 0;
- for (Iterator it = wheels.iterator(); it.hasNext();) {
- VehicleWheel physicsVehicleWheel = it.next();
- Vector3f location = physicsVehicleWheel.getLocation().clone();
- Vector3f direction = physicsVehicleWheel.getDirection().clone();
- Vector3f axle = physicsVehicleWheel.getAxle().clone();
- float restLength = physicsVehicleWheel.getRestLength();
- float radius = physicsVehicleWheel.getRadius();
-
- Geometry locGeom = (Geometry) debugNode.getChild("WheelLocationDebugShape" + i);
- Geometry dirGeom = (Geometry) debugNode.getChild("WheelDirectionDebugShape" + i);
- Geometry axleGeom = (Geometry) debugNode.getChild("WheelAxleDebugShape" + i);
- Geometry wheelGeom = (Geometry) debugNode.getChild("WheelRadiusDebugShape" + i);
-
- Arrow locArrow = (Arrow) locGeom.getMesh();
- locArrow.setArrowExtent(location);
- Arrow axleArrow = (Arrow) axleGeom.getMesh();
- axleArrow.setArrowExtent(axle.normalizeLocal().multLocal(0.3f));
- Arrow wheelArrow = (Arrow) wheelGeom.getMesh();
- wheelArrow.setArrowExtent(direction.normalizeLocal().multLocal(radius));
- Arrow dirArrow = (Arrow) dirGeom.getMesh();
- dirArrow.setArrowExtent(direction.normalizeLocal().multLocal(restLength));
-
- dirGeom.setLocalTranslation(location);
- axleGeom.setLocalTranslation(location.addLocal(direction));
- wheelGeom.setLocalTranslation(location);
- i++;
- }
- debugShape.updateLogicalState(0);
- debugShape.updateGeometricState();
- rm.renderScene(debugShape, vp);
- }
- }
-
- public void setPhysicsSpace(PhysicsSpace space) {
- createVehicle(space);
- if (space == null) {
- if (this.space != null) {
- this.space.removeCollisionObject(this);
- added = false;
- }
- } else {
- if(this.space==space) return;
- space.addCollisionObject(this);
- added = true;
- }
- this.space = space;
- }
-
- public PhysicsSpace getPhysicsSpace() {
- return space;
- }
-
- @Override
- public void write(JmeExporter ex) throws IOException {
- super.write(ex);
- OutputCapsule oc = ex.getCapsule(this);
- oc.write(enabled, "enabled", true);
- oc.write(motionState.isApplyPhysicsLocal(), "applyLocalPhysics", false);
- oc.write(spatial, "spatial", null);
- }
-
- @Override
- public void read(JmeImporter im) throws IOException {
- super.read(im);
- InputCapsule ic = im.getCapsule(this);
- enabled = ic.readBoolean("enabled", true);
- spatial = (Spatial) ic.readSavable("spatial", null);
- motionState.setApplyPhysicsLocal(ic.readBoolean("applyLocalPhysics", false));
- setUserObject(spatial);
- }
-}
diff --git a/engine/src/bullet/com/jme3/bullet/control/ragdoll/HumanoidRagdollPreset.java b/engine/src/bullet/com/jme3/bullet/control/ragdoll/HumanoidRagdollPreset.java
deleted file mode 100644
index 06eeab052..000000000
--- a/engine/src/bullet/com/jme3/bullet/control/ragdoll/HumanoidRagdollPreset.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-package com.jme3.bullet.control.ragdoll;
-
-import com.jme3.math.FastMath;
-
-/**
- *
- * @author Nehon
- */
-public class HumanoidRagdollPreset extends RagdollPreset {
-
- @Override
- protected void initBoneMap() {
- boneMap.put("head", new JointPreset(FastMath.QUARTER_PI, -FastMath.QUARTER_PI, FastMath.QUARTER_PI, -FastMath.QUARTER_PI, FastMath.QUARTER_PI, -FastMath.QUARTER_PI));
-
- boneMap.put("torso", new JointPreset(FastMath.QUARTER_PI, -FastMath.QUARTER_PI, 0, 0, FastMath.QUARTER_PI, -FastMath.QUARTER_PI));
-
- boneMap.put("upperleg", new JointPreset(FastMath.PI, -FastMath.QUARTER_PI, FastMath.QUARTER_PI/2, -FastMath.QUARTER_PI/2, FastMath.QUARTER_PI, -FastMath.QUARTER_PI));
-
- boneMap.put("lowerleg", new JointPreset(0, -FastMath.PI, 0, 0, 0, 0));
-
- boneMap.put("foot", new JointPreset(0, -FastMath.QUARTER_PI, FastMath.QUARTER_PI, -FastMath.QUARTER_PI, FastMath.QUARTER_PI, -FastMath.QUARTER_PI));
-
- boneMap.put("upperarm", new JointPreset(FastMath.HALF_PI, -FastMath.QUARTER_PI, 0, 0, FastMath.HALF_PI, -FastMath.QUARTER_PI));
-
- boneMap.put("lowerarm", new JointPreset(FastMath.HALF_PI, 0, 0, 0, 0, 0));
-
- boneMap.put("hand", new JointPreset(FastMath.QUARTER_PI, -FastMath.QUARTER_PI, FastMath.QUARTER_PI, -FastMath.QUARTER_PI, FastMath.QUARTER_PI, -FastMath.QUARTER_PI));
-
- }
-
- @Override
- protected void initLexicon() {
- LexiconEntry entry = new LexiconEntry();
- entry.addSynonym("head", 100);
- lexicon.put("head", entry);
-
- entry = new LexiconEntry();
- entry.addSynonym("torso", 100);
- entry.addSynonym("chest", 100);
- entry.addSynonym("spine", 45);
- entry.addSynonym("high", 25);
- lexicon.put("torso", entry);
-
- entry = new LexiconEntry();
- entry.addSynonym("upperleg", 100);
- entry.addSynonym("thigh", 100);
- entry.addSynonym("hip", 75);
- entry.addSynonym("leg", 40);
- entry.addSynonym("high", 10);
- entry.addSynonym("up", 15);
- entry.addSynonym("upper", 15);
- lexicon.put("upperleg", entry);
-
- entry = new LexiconEntry();
- entry.addSynonym("lowerleg", 100);
- entry.addSynonym("calf", 100);
- entry.addSynonym("knee", 75);
- entry.addSynonym("leg", 50);
- entry.addSynonym("low", 10);
- entry.addSynonym("lower", 10);
- lexicon.put("lowerleg", entry);
-
- entry = new LexiconEntry();
- entry.addSynonym("foot", 100);
- entry.addSynonym("ankle", 75);
- lexicon.put("foot", entry);
-
-
- entry = new LexiconEntry();
- entry.addSynonym("upperarm", 100);
- entry.addSynonym("humerus", 100);
- entry.addSynonym("shoulder", 50);
- entry.addSynonym("arm", 40);
- entry.addSynonym("high", 10);
- entry.addSynonym("up", 15);
- entry.addSynonym("upper", 15);
- lexicon.put("upperarm", entry);
-
- entry = new LexiconEntry();
- entry.addSynonym("lowerarm", 100);
- entry.addSynonym("ulna", 100);
- entry.addSynonym("elbow", 75);
- entry.addSynonym("arm", 50);
- entry.addSynonym("low", 10);
- entry.addSynonym("lower", 10);
- lexicon.put("lowerarm", entry);
-
- entry = new LexiconEntry();
- entry.addSynonym("hand", 100);
- entry.addSynonym("fist", 100);
- entry.addSynonym("wrist", 75);
- lexicon.put("hand", entry);
-
- }
-}
diff --git a/engine/src/bullet/com/jme3/bullet/control/ragdoll/RagdollPreset.java b/engine/src/bullet/com/jme3/bullet/control/ragdoll/RagdollPreset.java
deleted file mode 100644
index 51bf4babf..000000000
--- a/engine/src/bullet/com/jme3/bullet/control/ragdoll/RagdollPreset.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-package com.jme3.bullet.control.ragdoll;
-
-import com.jme3.bullet.joints.SixDofJoint;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- *
- * @author Nehon
- */
-public abstract class RagdollPreset {
-
- protected static final Logger logger = Logger.getLogger(RagdollPreset.class.getName());
- protected Map boneMap = new HashMap();
- protected Map lexicon = new HashMap();
-
- protected abstract void initBoneMap();
-
- protected abstract void initLexicon();
-
- public void setupJointForBone(String boneName, SixDofJoint joint) {
-
- if (boneMap.isEmpty()) {
- initBoneMap();
- }
- if (lexicon.isEmpty()) {
- initLexicon();
- }
- String resultName = "";
- int resultScore = 0;
-
- for (String key : lexicon.keySet()) {
-
- int score = lexicon.get(key).getScore(boneName);
- if (score > resultScore) {
- resultScore = score;
- resultName = key;
- }
-
- }
-
- JointPreset preset = boneMap.get(resultName);
-
- if (preset != null && resultScore >= 50) {
- logger.log(Level.INFO, "Found matching joint for bone {0} : {1} with score {2}", new Object[]{boneName, resultName, resultScore});
- preset.setupJoint(joint);
- } else {
- logger.log(Level.INFO, "No joint match found for bone {0}", boneName);
- if (resultScore > 0) {
- logger.log(Level.INFO, "Best match found is {0} with score {1}", new Object[]{resultName, resultScore});
- }
- new JointPreset().setupJoint(joint);
- }
-
- }
-
- protected class JointPreset {
-
- private float maxX, minX, maxY, minY, maxZ, minZ;
-
- public JointPreset() {
- }
-
- public JointPreset(float maxX, float minX, float maxY, float minY, float maxZ, float minZ) {
- this.maxX = maxX;
- this.minX = minX;
- this.maxY = maxY;
- this.minY = minY;
- this.maxZ = maxZ;
- this.minZ = minZ;
- }
-
- public void setupJoint(SixDofJoint joint) {
- joint.getRotationalLimitMotor(0).setHiLimit(maxX);
- joint.getRotationalLimitMotor(0).setLoLimit(minX);
- joint.getRotationalLimitMotor(1).setHiLimit(maxY);
- joint.getRotationalLimitMotor(1).setLoLimit(minY);
- joint.getRotationalLimitMotor(2).setHiLimit(maxZ);
- joint.getRotationalLimitMotor(2).setLoLimit(minZ);
- }
- }
-
- protected class LexiconEntry extends HashMap {
-
- public void addSynonym(String word, int score) {
- put(word.toLowerCase(), score);
- }
-
- public int getScore(String word) {
- int score = 0;
- String searchWord = word.toLowerCase();
- for (String key : this.keySet()) {
- if (searchWord.indexOf(key) >= 0) {
- score += get(key);
- }
- }
- return score;
- }
- }
-}
diff --git a/engine/src/bullet/com/jme3/bullet/control/ragdoll/RagdollUtils.java b/engine/src/bullet/com/jme3/bullet/control/ragdoll/RagdollUtils.java
deleted file mode 100644
index 7aeb3a901..000000000
--- a/engine/src/bullet/com/jme3/bullet/control/ragdoll/RagdollUtils.java
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-package com.jme3.bullet.control.ragdoll;
-
-import com.jme3.animation.Bone;
-import com.jme3.animation.Skeleton;
-import com.jme3.bullet.collision.shapes.HullCollisionShape;
-import com.jme3.bullet.joints.SixDofJoint;
-import com.jme3.math.Quaternion;
-import com.jme3.math.Transform;
-import com.jme3.math.Vector3f;
-import com.jme3.scene.Geometry;
-import com.jme3.scene.Mesh;
-import com.jme3.scene.Node;
-import com.jme3.scene.Spatial;
-import com.jme3.scene.VertexBuffer.Type;
-import java.nio.ByteBuffer;
-import java.nio.FloatBuffer;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-/**
- *
- * @author Nehon
- */
-public class RagdollUtils {
-
- public static void setJointLimit(SixDofJoint joint, float maxX, float minX, float maxY, float minY, float maxZ, float minZ) {
-
- joint.getRotationalLimitMotor(0).setHiLimit(maxX);
- joint.getRotationalLimitMotor(0).setLoLimit(minX);
- joint.getRotationalLimitMotor(1).setHiLimit(maxY);
- joint.getRotationalLimitMotor(1).setLoLimit(minY);
- joint.getRotationalLimitMotor(2).setHiLimit(maxZ);
- joint.getRotationalLimitMotor(2).setLoLimit(minZ);
- }
-
- public static Map> buildPointMap(Spatial model) {
-
-
- Map> map = new HashMap>();
- if (model instanceof Geometry) {
- Geometry g = (Geometry) model;
- buildPointMapForMesh(g.getMesh(), map);
- } else if (model instanceof Node) {
- Node node = (Node) model;
- for (Spatial s : node.getChildren()) {
- if (s instanceof Geometry) {
- Geometry g = (Geometry) s;
- buildPointMapForMesh(g.getMesh(), map);
- }
- }
- }
- return map;
- }
-
- private static Map> buildPointMapForMesh(Mesh mesh, Map> map) {
-
- FloatBuffer vertices = mesh.getFloatBuffer(Type.Position);
- ByteBuffer boneIndices = (ByteBuffer) mesh.getBuffer(Type.BoneIndex).getData();
- FloatBuffer boneWeight = (FloatBuffer) mesh.getBuffer(Type.BoneWeight).getData();
-
- vertices.rewind();
- boneIndices.rewind();
- boneWeight.rewind();
-
- int vertexComponents = mesh.getVertexCount() * 3;
- int k, start, index;
- float maxWeight = 0;
-
- for (int i = 0; i < vertexComponents; i += 3) {
-
-
- start = i / 3 * 4;
- index = 0;
- maxWeight = -1;
- for (k = start; k < start + 4; k++) {
- float weight = boneWeight.get(k);
- if (weight > maxWeight) {
- maxWeight = weight;
- index = boneIndices.get(k);
- }
- }
- List points = map.get(index);
- if (points == null) {
- points = new ArrayList();
- map.put(index, points);
- }
- points.add(vertices.get(i));
- points.add(vertices.get(i + 1));
- points.add(vertices.get(i + 2));
- }
- return map;
- }
-
- /**
- * Create a hull collision shape from linked vertices to this bone.
- * Vertices have to be previoulsly gathered in a map using buildPointMap method
- * @param link
- * @param model
- * @return
- */
- public static HullCollisionShape makeShapeFromPointMap(Map> pointsMap, List boneIndices, Vector3f initialScale, Vector3f initialPosition) {
-
- ArrayList points = new ArrayList();
- for (Integer index : boneIndices) {
- List l = pointsMap.get(index);
- if (l != null) {
-
- for (int i = 0; i < l.size(); i += 3) {
- Vector3f pos = new Vector3f();
- pos.x = l.get(i);
- pos.y = l.get(i + 1);
- pos.z = l.get(i + 2);
- pos.subtractLocal(initialPosition).multLocal(initialScale);
- points.add(pos.x);
- points.add(pos.y);
- points.add(pos.z);
- }
- }
- }
-
- float[] p = new float[points.size()];
- for (int i = 0; i < points.size(); i++) {
- p[i] = points.get(i);
- }
-
-
- return new HullCollisionShape(p);
- }
-
- //retruns the list of bone indices of the given bone and its child(if they are not in the boneList)
- public static List getBoneIndices(Bone bone, Skeleton skeleton, Set boneList) {
- List list = new LinkedList();
- if (boneList.isEmpty()) {
- list.add(skeleton.getBoneIndex(bone));
- } else {
- list.add(skeleton.getBoneIndex(bone));
- for (Bone chilBone : bone.getChildren()) {
- if (!boneList.contains(chilBone.getName())) {
- list.addAll(getBoneIndices(chilBone, skeleton, boneList));
- }
- }
- }
- return list;
- }
-
- /**
- * Create a hull collision shape from linked vertices to this bone.
- *
- * @param link
- * @param model
- * @return
- */
- public static HullCollisionShape makeShapeFromVerticeWeights(Spatial model, List boneIndices, Vector3f initialScale, Vector3f initialPosition, float weightThreshold) {
-
- ArrayList points = new ArrayList();
- if (model instanceof Geometry) {
- Geometry g = (Geometry) model;
- for (Integer index : boneIndices) {
- points.addAll(getPoints(g.getMesh(), index, initialScale, initialPosition, weightThreshold));
- }
- } else if (model instanceof Node) {
- Node node = (Node) model;
- for (Spatial s : node.getChildren()) {
- if (s instanceof Geometry) {
- Geometry g = (Geometry) s;
- for (Integer index : boneIndices) {
- points.addAll(getPoints(g.getMesh(), index, initialScale, initialPosition, weightThreshold));
- }
-
- }
- }
- }
- float[] p = new float[points.size()];
- for (int i = 0; i < points.size(); i++) {
- p[i] = points.get(i);
- }
-
-
- return new HullCollisionShape(p);
- }
-
- /**
- * returns a list of points for the given bone
- * @param mesh
- * @param boneIndex
- * @param offset
- * @param link
- * @return
- */
- private static List getPoints(Mesh mesh, int boneIndex, Vector3f initialScale, Vector3f offset, float weightThreshold) {
-
- FloatBuffer vertices = mesh.getFloatBuffer(Type.Position);
- ByteBuffer boneIndices = (ByteBuffer) mesh.getBuffer(Type.BoneIndex).getData();
- FloatBuffer boneWeight = (FloatBuffer) mesh.getBuffer(Type.BoneWeight).getData();
-
- vertices.rewind();
- boneIndices.rewind();
- boneWeight.rewind();
-
- ArrayList results = new ArrayList();
-
- int vertexComponents = mesh.getVertexCount() * 3;
-
- for (int i = 0; i < vertexComponents; i += 3) {
- int k;
- boolean add = false;
- int start = i / 3 * 4;
- for (k = start; k < start + 4; k++) {
- if (boneIndices.get(k) == boneIndex && boneWeight.get(k) >= weightThreshold) {
- add = true;
- break;
- }
- }
- if (add) {
-
- Vector3f pos = new Vector3f();
- pos.x = vertices.get(i);
- pos.y = vertices.get(i + 1);
- pos.z = vertices.get(i + 2);
- pos.subtractLocal(offset).multLocal(initialScale);
- results.add(pos.x);
- results.add(pos.y);
- results.add(pos.z);
-
- }
- }
-
- return results;
- }
-
- /**
- * Updates a bone position and rotation.
- * if the child bones are not in the bone list this means, they are not associated with a physic shape.
- * So they have to be updated
- * @param bone the bone
- * @param pos the position
- * @param rot the rotation
- */
- public static void setTransform(Bone bone, Vector3f pos, Quaternion rot, boolean restoreBoneControl, Set boneList) {
- //we ensure that we have the control
- if (restoreBoneControl) {
- bone.setUserControl(true);
- }
- //we set te user transforms of the bone
- bone.setUserTransformsWorld(pos, rot);
- for (Bone childBone : bone.getChildren()) {
- //each child bone that is not in the list is updated
- if (!boneList.contains(childBone.getName())) {
- Transform t = childBone.getCombinedTransform(pos, rot);
- setTransform(childBone, t.getTranslation(), t.getRotation(), restoreBoneControl, boneList);
- }
- }
- //we give back the control to the keyframed animation
- if (restoreBoneControl) {
- bone.setUserControl(false);
- }
- }
-
- public static void setUserControl(Bone bone, boolean bool) {
- bone.setUserControl(bool);
- for (Bone child : bone.getChildren()) {
- setUserControl(child, bool);
- }
- }
-}
diff --git a/engine/src/bullet/native/android/Android.mk b/engine/src/bullet/native/android/Android.mk
deleted file mode 100644
index 3db035184..000000000
--- a/engine/src/bullet/native/android/Android.mk
+++ /dev/null
@@ -1,259 +0,0 @@
-# /*
-# Bullet Continuous Collision Detection and Physics Library for Android NDK
-# Copyright (c) 2006-2009 Noritsuna Imamura http://www.siprop.org/
-#
-# This software is provided 'as-is', without any express or implied warranty.
-# In no event will the authors be held liable for any damages arising from the use of this software.
-# Permission is granted to anyone to use this software for any purpose,
-# including commercial applications, and to alter it and redistribute it freely,
-# subject to the following restrictions:
-#
-# 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
-# 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
-# 3. This notice may not be removed or altered from any source distribution.
-# */
-LOCAL_PATH:= $(call my-dir)
-JME3_PATH:=
-BULLET_PATH:=
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := bulletjme
-LOCAL_C_INCLUDES := $(BULLET_PATH)/\
- $(BULLET_PATH)/BulletCollision/BroadphaseCollision\
- $(BULLET_PATH)/BulletCollision/CollisionDispatch\
- $(BULLET_PATH)/BulletCollision/CollisionShapes\
- $(BULLET_PATH)/BulletCollision/NarrowPhaseCollision\
- $(BULLET_PATH)/BulletDynamics/ConstraintSolver\
- $(BULLET_PATH)/BulletDynamics/Dynamics\
- $(BULLET_PATH)/BulletDynamics/Vehicle\
- $(BULLET_PATH)/LinearMath\
- $(BULLET_PATH)/BulletCollision\
- $(BULLET_PATH)/BulletDynamics\
- $(BULLET_PATH)/BulletMultiThreaded\
- $(BULLET_PATH)/BulletSoftBody\
- $(BULLET_PATH)/ibmsdk\
- $(BULLET_PATH)/LinearMath\
- $(BULLET_PATH)/MiniCL\
- $(BULLET_PATH)/vectormath\
- $(BULLET_PATH)/BulletCollision/BroadphaseCollision\
- $(BULLET_PATH)/BulletCollision/CollisionDispatch\
- $(BULLET_PATH)/BulletCollision/CollisionShapes\
- $(BULLET_PATH)/BulletCollision/Gimpact\
- $(BULLET_PATH)/BulletCollision/ibmsdk\
- $(BULLET_PATH)/BulletCollision/NarrowPhaseCollision\
- $(BULLET_PATH)/BulletDynamics/Character\
- $(BULLET_PATH)/BulletDynamics/ConstraintSolver\
- $(BULLET_PATH)/BulletDynamics/Dynamics\
- $(BULLET_PATH)/BulletDynamics/ibmsdk\
- $(BULLET_PATH)/BulletDynamics/Vehicle\
- $(BULLET_PATH)/BulletMultiThreaded/GpuSoftBodySolvers\
- $(BULLET_PATH)/BulletMultiThreaded/out\
- $(BULLET_PATH)/BulletMultiThreaded/SpuNarrowPhaseCollisionTask\
- $(BULLET_PATH)/BulletMultiThreaded/SpuSampleTask\
- $(BULLET_PATH)/BulletMultiThreaded/GpuSoftBodySolvers/CPU\
- $(BULLET_PATH)/BulletMultiThreaded/GpuSoftBodySolvers/DX11\
- $(BULLET_PATH)/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL\
- $(BULLET_PATH)/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL\
- $(BULLET_PATH)/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/AMD\
- $(BULLET_PATH)/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/Apple\
- $(BULLET_PATH)/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/MiniCL\
- $(BULLET_PATH)/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/NVidia\
- $(BULLET_PATH)/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC\
- $(BULLET_PATH)/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10\
- $(BULLET_PATH)/LinearMath/ibmsdk\
- $(BULLET_PATH)/MiniCL/MiniCLTask\
- $(BULLET_PATH)/vectormath/scalar\
- $(BULLET_PATH)/vectormath/sse
-
-LOCAL_CFLAGS := $(LOCAL_C_INCLUDES:%=-I%)
-LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -ldl -lm -llog
-
-LOCAL_SRC_FILES := $(JME3_PATH)/com_jme3_bullet_collision_PhysicsCollisionEvent.cpp\
- $(JME3_PATH)/com_jme3_bullet_collision_PhysicsCollisionObject.cpp\
- $(JME3_PATH)/com_jme3_bullet_collision_shapes_BoxCollisionShape.cpp\
- $(JME3_PATH)/com_jme3_bullet_collision_shapes_CapsuleCollisionShape.cpp\
- $(JME3_PATH)/com_jme3_bullet_collision_shapes_CollisionShape.cpp\
- $(JME3_PATH)/com_jme3_bullet_collision_shapes_CompoundCollisionShape.cpp\
- $(JME3_PATH)/com_jme3_bullet_collision_shapes_ConeCollisionShape.cpp\
- $(JME3_PATH)/com_jme3_bullet_collision_shapes_CylinderCollisionShape.cpp\
- $(JME3_PATH)/com_jme3_bullet_collision_shapes_GImpactCollisionShape.cpp\
- $(JME3_PATH)/com_jme3_bullet_collision_shapes_HeightfieldCollisionShape.cpp\
- $(JME3_PATH)/com_jme3_bullet_collision_shapes_HullCollisionShape.cpp\
- $(JME3_PATH)/com_jme3_bullet_collision_shapes_MeshCollisionShape.cpp\
- $(JME3_PATH)/com_jme3_bullet_collision_shapes_PlaneCollisionShape.cpp\
- $(JME3_PATH)/com_jme3_bullet_collision_shapes_SimplexCollisionShape.cpp\
- $(JME3_PATH)/com_jme3_bullet_collision_shapes_SphereCollisionShape.cpp\
- $(JME3_PATH)/com_jme3_bullet_joints_ConeJoint.cpp\
- $(JME3_PATH)/com_jme3_bullet_joints_HingeJoint.cpp\
- $(JME3_PATH)/com_jme3_bullet_joints_motors_RotationalLimitMotor.cpp\
- $(JME3_PATH)/com_jme3_bullet_joints_motors_TranslationalLimitMotor.cpp\
- $(JME3_PATH)/com_jme3_bullet_joints_PhysicsJoint.cpp\
- $(JME3_PATH)/com_jme3_bullet_joints_Point2PointJoint.cpp\
- $(JME3_PATH)/com_jme3_bullet_joints_SixDofJoint.cpp\
- $(JME3_PATH)/com_jme3_bullet_joints_SixDofSpringJoint.cpp\
- $(JME3_PATH)/com_jme3_bullet_joints_SliderJoint.cpp\
- $(JME3_PATH)/com_jme3_bullet_objects_infos_RigidBodyMotionState.cpp\
- $(JME3_PATH)/com_jme3_bullet_objects_PhysicsCharacter.cpp\
- $(JME3_PATH)/com_jme3_bullet_objects_PhysicsGhostObject.cpp\
- $(JME3_PATH)/com_jme3_bullet_objects_PhysicsRigidBody.cpp\
- $(JME3_PATH)/com_jme3_bullet_objects_PhysicsVehicle.cpp\
- $(JME3_PATH)/com_jme3_bullet_objects_VehicleWheel.cpp\
- $(JME3_PATH)/com_jme3_bullet_PhysicsSpace.cpp\
- $(JME3_PATH)/com_jme3_bullet_util_DebugShapeFactory.cpp\
- $(JME3_PATH)/com_jme3_bullet_util_NativeMeshUtil.cpp\
- $(JME3_PATH)/jmeBulletUtil.cpp\
- $(JME3_PATH)/jmeClasses.cpp\
- $(JME3_PATH)/jmeMotionState.cpp\
- $(JME3_PATH)/jmePhysicsSpace.cpp\
- $(BULLET_PATH)/BulletCollision/BroadphaseCollision/btAxisSweep3.cpp\
- $(BULLET_PATH)/BulletCollision/BroadphaseCollision/btBroadphaseProxy.cpp\
- $(BULLET_PATH)/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp\
- $(BULLET_PATH)/BulletCollision/BroadphaseCollision/btDbvt.cpp\
- $(BULLET_PATH)/BulletCollision/BroadphaseCollision/btDbvtBroadphase.cpp\
- $(BULLET_PATH)/BulletCollision/BroadphaseCollision/btDispatcher.cpp\
- $(BULLET_PATH)/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.cpp\
- $(BULLET_PATH)/BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp\
- $(BULLET_PATH)/BulletCollision/BroadphaseCollision/btQuantizedBvh.cpp\
- $(BULLET_PATH)/BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionDispatch/btBoxBoxDetector.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionDispatch/btCollisionObject.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionDispatch/btCollisionWorld.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionDispatch/btGhostObject.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionDispatch/btInternalEdgeUtility.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionDispatch/btManifoldResult.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionDispatch/btUnionFind.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionDispatch/SphereTriangleDetector.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionShapes/btBox2dShape.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionShapes/btBoxShape.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionShapes/btCapsuleShape.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionShapes/btCollisionShape.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionShapes/btCompoundShape.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionShapes/btConcaveShape.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionShapes/btConeShape.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionShapes/btConvex2dShape.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionShapes/btConvexHullShape.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionShapes/btConvexInternalShape.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionShapes/btConvexPointCloudShape.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionShapes/btConvexPolyhedron.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionShapes/btConvexShape.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionShapes/btCylinderShape.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionShapes/btEmptyShape.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionShapes/btMinkowskiSumShape.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionShapes/btMultiSphereShape.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionShapes/btOptimizedBvh.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionShapes/btShapeHull.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionShapes/btSphereShape.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionShapes/btStaticPlaneShape.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionShapes/btStridingMeshInterface.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionShapes/btTetrahedronShape.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionShapes/btTriangleBuffer.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionShapes/btTriangleCallback.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionShapes/btTriangleMesh.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionShapes/btTriangleMeshShape.cpp\
- $(BULLET_PATH)/BulletCollision/CollisionShapes/btUniformScalingShape.cpp\
- $(BULLET_PATH)/BulletCollision/Gimpact/btContactProcessing.cpp\
- $(BULLET_PATH)/BulletCollision/Gimpact/btGenericPoolAllocator.cpp\
- $(BULLET_PATH)/BulletCollision/Gimpact/btGImpactBvh.cpp\
- $(BULLET_PATH)/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.cpp\
- $(BULLET_PATH)/BulletCollision/Gimpact/btGImpactQuantizedBvh.cpp\
- $(BULLET_PATH)/BulletCollision/Gimpact/btGImpactShape.cpp\
- $(BULLET_PATH)/BulletCollision/Gimpact/btTriangleShapeEx.cpp\
- $(BULLET_PATH)/BulletCollision/Gimpact/gim_box_set.cpp\
- $(BULLET_PATH)/BulletCollision/Gimpact/gim_contact.cpp\
- $(BULLET_PATH)/BulletCollision/Gimpact/gim_memory.cpp\
- $(BULLET_PATH)/BulletCollision/Gimpact/gim_tri_collision.cpp\
- $(BULLET_PATH)/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.cpp\
- $(BULLET_PATH)/BulletCollision/NarrowPhaseCollision/btConvexCast.cpp\
- $(BULLET_PATH)/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.cpp\
- $(BULLET_PATH)/BulletCollision/NarrowPhaseCollision/btGjkEpa2.cpp\
- $(BULLET_PATH)/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp\
- $(BULLET_PATH)/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp\
- $(BULLET_PATH)/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp\
- $(BULLET_PATH)/BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp\
- $(BULLET_PATH)/BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.cpp\
- $(BULLET_PATH)/BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp\
- $(BULLET_PATH)/BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.cpp\
- $(BULLET_PATH)/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.cpp\
- $(BULLET_PATH)/BulletDynamics/Character/btKinematicCharacterController.cpp\
- $(BULLET_PATH)/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp\
- $(BULLET_PATH)/BulletDynamics/ConstraintSolver/btContactConstraint.cpp\
- $(BULLET_PATH)/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp\
- $(BULLET_PATH)/BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.cpp\
- $(BULLET_PATH)/BulletDynamics/ConstraintSolver/btHinge2Constraint.cpp\
- $(BULLET_PATH)/BulletDynamics/ConstraintSolver/btHingeConstraint.cpp\
- $(BULLET_PATH)/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.cpp\
- $(BULLET_PATH)/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp\
- $(BULLET_PATH)/BulletDynamics/ConstraintSolver/btSliderConstraint.cpp\
- $(BULLET_PATH)/BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.cpp\
- $(BULLET_PATH)/BulletDynamics/ConstraintSolver/btTypedConstraint.cpp\
- $(BULLET_PATH)/BulletDynamics/ConstraintSolver/btUniversalConstraint.cpp\
- $(BULLET_PATH)/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp\
- $(BULLET_PATH)/BulletDynamics/Dynamics/btRigidBody.cpp\
- $(BULLET_PATH)/BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp\
- $(BULLET_PATH)/BulletDynamics/Dynamics/Bullet-C-API.cpp\
- $(BULLET_PATH)/BulletDynamics/Vehicle/btRaycastVehicle.cpp\
- $(BULLET_PATH)/BulletDynamics/Vehicle/btWheelInfo.cpp\
- $(BULLET_PATH)/BulletMultiThreaded/btGpu3DGridBroadphase.cpp\
- $(BULLET_PATH)/BulletMultiThreaded/btParallelConstraintSolver.cpp\
- $(BULLET_PATH)/BulletMultiThreaded/btThreadSupportInterface.cpp\
- $(BULLET_PATH)/BulletMultiThreaded/PosixThreadSupport.cpp\
- $(BULLET_PATH)/BulletMultiThreaded/SequentialThreadSupport.cpp\
- $(BULLET_PATH)/BulletMultiThreaded/SpuCollisionObjectWrapper.cpp\
- $(BULLET_PATH)/BulletMultiThreaded/SpuCollisionTaskProcess.cpp\
- $(BULLET_PATH)/BulletMultiThreaded/SpuContactManifoldCollisionAlgorithm.cpp\
- $(BULLET_PATH)/BulletMultiThreaded/SpuFakeDma.cpp\
- $(BULLET_PATH)/BulletMultiThreaded/SpuGatheringCollisionDispatcher.cpp\
- $(BULLET_PATH)/BulletMultiThreaded/SpuLibspe2Support.cpp\
- $(BULLET_PATH)/BulletMultiThreaded/SpuSampleTaskProcess.cpp\
- $(BULLET_PATH)/BulletMultiThreaded/Win32ThreadSupport.cpp\
- $(BULLET_PATH)/BulletMultiThreaded/GpuSoftBodySolvers/CPU/btSoftBodySolver_CPU.cpp\
- $(BULLET_PATH)/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/MiniCL/MiniCLTaskWrap.cpp\
- $(BULLET_PATH)/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/boxBoxDistance.cpp\
- $(BULLET_PATH)/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuCollisionShapes.cpp\
- $(BULLET_PATH)/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuContactResult.cpp\
- $(BULLET_PATH)/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuGatheringCollisionTask.cpp\
- $(BULLET_PATH)/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuMinkowskiPenetrationDepthSolver.cpp\
- $(BULLET_PATH)/BulletMultiThreaded/SpuSampleTask/SpuSampleTask.cpp\
- $(BULLET_PATH)/BulletSoftBody/btDefaultSoftBodySolver.cpp\
- $(BULLET_PATH)/BulletSoftBody/btSoftBody.cpp\
- $(BULLET_PATH)/BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.cpp\
- $(BULLET_PATH)/BulletSoftBody/btSoftBodyHelpers.cpp\
- $(BULLET_PATH)/BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.cpp\
- $(BULLET_PATH)/BulletSoftBody/btSoftRigidCollisionAlgorithm.cpp\
- $(BULLET_PATH)/BulletSoftBody/btSoftRigidDynamicsWorld.cpp\
- $(BULLET_PATH)/BulletSoftBody/btSoftSoftCollisionAlgorithm.cpp\
- $(BULLET_PATH)/LinearMath/btAlignedAllocator.cpp\
- $(BULLET_PATH)/LinearMath/btConvexHull.cpp\
- $(BULLET_PATH)/LinearMath/btConvexHullComputer.cpp\
- $(BULLET_PATH)/LinearMath/btGeometryUtil.cpp\
- $(BULLET_PATH)/LinearMath/btQuickprof.cpp\
- $(BULLET_PATH)/LinearMath/btSerializer.cpp\
- $(BULLET_PATH)/MiniCL/MiniCL.cpp\
- $(BULLET_PATH)/MiniCL/MiniCLTaskScheduler.cpp\
- $(BULLET_PATH)/MiniCL/MiniCLTask/MiniCLTask.cpp
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/engine/src/bullet/native/android/Application.mk b/engine/src/bullet/native/android/Application.mk
deleted file mode 100644
index 9e8be3571..000000000
--- a/engine/src/bullet/native/android/Application.mk
+++ /dev/null
@@ -1,2 +0,0 @@
-APP_MODULES := bulletjme
-APP_ABI := all
\ No newline at end of file
diff --git a/engine/src/bullet/native/android/jmePhysicsSpace.cpp b/engine/src/bullet/native/android/jmePhysicsSpace.cpp
deleted file mode 100644
index efed1b612..000000000
--- a/engine/src/bullet/native/android/jmePhysicsSpace.cpp
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
- * Copyright (c) 2009-2010 jMonkeyEngine
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, 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.
- */
-#include "jmePhysicsSpace.h"
-#include "jmeBulletUtil.h"
-#include
-
-/**
- * Author: Normen Hansen
- */
-jmePhysicsSpace::jmePhysicsSpace(JNIEnv* env, jobject javaSpace) {
- //TODO: global ref? maybe not -> cleaning, rather callback class?
- this->javaPhysicsSpace = env->NewWeakGlobalRef(javaSpace);
- this->env = env;
- env->GetJavaVM(&vm);
- if (env->ExceptionCheck()) {
- env->Throw(env->ExceptionOccurred());
- return;
- }
-}
-
-void jmePhysicsSpace::attachThread() {
-#ifdef JNI_VERSION_1_2
- vm->AttachCurrentThread((JNIEnv**) &env, NULL);
-#else
- vm->AttachCurrentThread(&env, NULL);
-#endif
-}
-
-JNIEnv* jmePhysicsSpace::getEnv() {
- attachThread();
- return this->env;
-}
-
-void jmePhysicsSpace::stepSimulation(jfloat tpf, jint maxSteps, jfloat accuracy) {
- dynamicsWorld->stepSimulation(tpf, maxSteps, accuracy);
-}
-
-btThreadSupportInterface* jmePhysicsSpace::createSolverThreadSupport(int maxNumThreads) {
-#ifdef _WIN32
- Win32ThreadSupport::Win32ThreadConstructionInfo threadConstructionInfo("solverThreads", SolverThreadFunc, SolverlsMemoryFunc, maxNumThreads);
- Win32ThreadSupport* threadSupport = new Win32ThreadSupport(threadConstructionInfo);
- threadSupport->startSPU();
-#elif defined (USE_PTHREADS)
- PosixThreadSupport::ThreadConstructionInfo constructionInfo("collision", SolverThreadFunc,
- SolverlsMemoryFunc, maxNumThreads);
- PosixThreadSupport* threadSupport = new PosixThreadSupport(constructionInfo);
- threadSupport->startSPU();
-#else
- SequentialThreadSupport::SequentialThreadConstructionInfo tci("solverThreads", SolverThreadFunc, SolverlsMemoryFunc);
- SequentialThreadSupport* threadSupport = new SequentialThreadSupport(tci);
- threadSupport->startSPU();
-#endif
- return threadSupport;
-}
-
-btThreadSupportInterface* jmePhysicsSpace::createDispatchThreadSupport(int maxNumThreads) {
-#ifdef _WIN32
- Win32ThreadSupport::Win32ThreadConstructionInfo threadConstructionInfo("solverThreads", processCollisionTask, createCollisionLocalStoreMemory, maxNumThreads);
- Win32ThreadSupport* threadSupport = new Win32ThreadSupport(threadConstructionInfo);
- threadSupport->startSPU();
-#elif defined (USE_PTHREADS)
- PosixThreadSupport::ThreadConstructionInfo solverConstructionInfo("solver", processCollisionTask,
- createCollisionLocalStoreMemory, maxNumThreads);
- PosixThreadSupport* threadSupport = new PosixThreadSupport(solverConstructionInfo);
- threadSupport->startSPU();
-#else
- SequentialThreadSupport::SequentialThreadConstructionInfo tci("solverThreads", processCollisionTask, createCollisionLocalStoreMemory);
- SequentialThreadSupport* threadSupport = new SequentialThreadSupport(tci);
- threadSupport->startSPU();
-#endif
- return threadSupport;
-}
-
-void jmePhysicsSpace::createPhysicsSpace(jfloat minX, jfloat minY, jfloat minZ, jfloat maxX, jfloat maxY, jfloat maxZ, jint broadphaseId, jboolean threading) {
- // collision configuration contains default setup for memory, collision setup
- btDefaultCollisionConstructionInfo cci;
- // if(threading){
- // cci.m_defaultMaxPersistentManifoldPoolSize = 32768;
- // }
- btCollisionConfiguration* collisionConfiguration = new btDefaultCollisionConfiguration(cci);
-
- btVector3 min = btVector3(minX, minY, minZ);
- btVector3 max = btVector3(maxX, maxY, maxZ);
-
- btBroadphaseInterface* broadphase;
-
- switch (broadphaseId) {
- case 0:
- broadphase = new btSimpleBroadphase();
- break;
- case 1:
- broadphase = new btAxisSweep3(min, max);
- break;
- case 2:
- //TODO: 32bit!
- broadphase = new btAxisSweep3(min, max);
- break;
- case 3:
- broadphase = new btDbvtBroadphase();
- break;
- case 4:
- // broadphase = new btGpu3DGridBroadphase(
- // min, max,
- // 20, 20, 20,
- // 10000, 1000, 25);
- break;
- }
-
- btCollisionDispatcher* dispatcher;
- btConstraintSolver* solver;
- // use the default collision dispatcher. For parallel processing you can use a diffent dispatcher (see Extras/BulletMultiThreaded)
- if (threading) {
- btThreadSupportInterface* dispatchThreads = createDispatchThreadSupport(4);
- dispatcher = new SpuGatheringCollisionDispatcher(dispatchThreads, 4, collisionConfiguration);
- dispatcher->setDispatcherFlags(btCollisionDispatcher::CD_DISABLE_CONTACTPOOL_DYNAMIC_ALLOCATION);
- } else {
- dispatcher = new btCollisionDispatcher(collisionConfiguration);
- }
-
- // the default constraint solver. For parallel processing you can use a different solver (see Extras/BulletMultiThreaded)
- if (threading) {
- btThreadSupportInterface* solverThreads = createSolverThreadSupport(4);
- solver = new btParallelConstraintSolver(solverThreads);
- } else {
- solver = new btSequentialImpulseConstraintSolver;
- }
-
- //create dynamics world
- btDiscreteDynamicsWorld* world = new btDiscreteDynamicsWorld(dispatcher, broadphase, solver, collisionConfiguration);
- dynamicsWorld = world;
- dynamicsWorld->setWorldUserInfo(this);
-
- //parallel solver requires the contacts to be in a contiguous pool, so avoid dynamic allocation
- if (threading) {
- world->getSimulationIslandManager()->setSplitIslands(false);
- world->getSolverInfo().m_numIterations = 4;
- world->getSolverInfo().m_solverMode = SOLVER_SIMD + SOLVER_USE_WARMSTARTING; //+SOLVER_RANDMIZE_ORDER;
- world->getDispatchInfo().m_enableSPU = true;
- }
-
- broadphase->getOverlappingPairCache()->setInternalGhostPairCallback(new btGhostPairCallback());
-
- dynamicsWorld->setGravity(btVector3(0, -9.81f, 0));
-
- struct jmeFilterCallback : public btOverlapFilterCallback {
- // return true when pairs need collision
-
- virtual bool needBroadphaseCollision(btBroadphaseProxy* proxy0, btBroadphaseProxy * proxy1) const {
- // bool collides = (proxy0->m_collisionFilterGroup & proxy1->m_collisionFilterMask) != 0;
- // collides = collides && (proxy1->m_collisionFilterGroup & proxy0->m_collisionFilterMask);
- bool collides = (proxy0->m_collisionFilterGroup & proxy1->m_collisionFilterMask) != 0;
- collides = collides && (proxy1->m_collisionFilterGroup & proxy0->m_collisionFilterMask);
- if (collides) {
- btCollisionObject* co0 = (btCollisionObject*) proxy0->m_clientObject;
- btCollisionObject* co1 = (btCollisionObject*) proxy1->m_clientObject;
- jmeUserPointer *up0 = (jmeUserPointer*) co0 -> getUserPointer();
- jmeUserPointer *up1 = (jmeUserPointer*) co1 -> getUserPointer();
- if (up0 != NULL && up1 != NULL) {
- collides = (up0->group & up1->groups) != 0;
- collides = collides && (up1->group & up0->groups);
-
- //add some additional logic here that modified 'collides'
- return collides;
- }
- return false;
- }
- return collides;
- }
- };
- dynamicsWorld->getPairCache()->setOverlapFilterCallback(new jmeFilterCallback());
- dynamicsWorld->setInternalTickCallback(&jmePhysicsSpace::preTickCallback, static_cast (this), true);
- dynamicsWorld->setInternalTickCallback(&jmePhysicsSpace::postTickCallback, static_cast (this));
- if (gContactProcessedCallback == NULL) {
- gContactProcessedCallback = &jmePhysicsSpace::contactProcessedCallback;
- }
-}
-
-void jmePhysicsSpace::preTickCallback(btDynamicsWorld *world, btScalar timeStep) {
- jmePhysicsSpace* dynamicsWorld = (jmePhysicsSpace*) world->getWorldUserInfo();
- JNIEnv* env = dynamicsWorld->getEnv();
- jobject javaPhysicsSpace = env->NewLocalRef(dynamicsWorld->getJavaPhysicsSpace());
- if (javaPhysicsSpace != NULL) {
- env->CallVoidMethod(javaPhysicsSpace, jmeClasses::PhysicsSpace_preTick, timeStep);
- env->DeleteLocalRef(javaPhysicsSpace);
- if (env->ExceptionCheck()) {
- env->Throw(env->ExceptionOccurred());
- return;
- }
- }
-}
-
-void jmePhysicsSpace::postTickCallback(btDynamicsWorld *world, btScalar timeStep) {
- jmePhysicsSpace* dynamicsWorld = (jmePhysicsSpace*) world->getWorldUserInfo();
- JNIEnv* env = dynamicsWorld->getEnv();
- jobject javaPhysicsSpace = env->NewLocalRef(dynamicsWorld->getJavaPhysicsSpace());
- if (javaPhysicsSpace != NULL) {
- env->CallVoidMethod(javaPhysicsSpace, jmeClasses::PhysicsSpace_postTick, timeStep);
- env->DeleteLocalRef(javaPhysicsSpace);
- if (env->ExceptionCheck()) {
- env->Throw(env->ExceptionOccurred());
- return;
- }
- }
-}
-
-bool jmePhysicsSpace::contactProcessedCallback(btManifoldPoint &cp, void *body0, void *body1) {
- // printf("contactProcessedCallback %d %dn", body0, body1);
- btCollisionObject* co0 = (btCollisionObject*) body0;
- jmeUserPointer *up0 = (jmeUserPointer*) co0 -> getUserPointer();
- btCollisionObject* co1 = (btCollisionObject*) body1;
- jmeUserPointer *up1 = (jmeUserPointer*) co1 -> getUserPointer();
- if (up0 != NULL) {
- jmePhysicsSpace *dynamicsWorld = (jmePhysicsSpace *)up0->space;
- if (dynamicsWorld != NULL) {
- JNIEnv* env = dynamicsWorld->getEnv();
- jobject javaPhysicsSpace = env->NewLocalRef(dynamicsWorld->getJavaPhysicsSpace());
- if (javaPhysicsSpace != NULL) {
- jobject javaCollisionObject0 = env->NewLocalRef(up0->javaCollisionObject);
- jobject javaCollisionObject1 = env->NewLocalRef(up1->javaCollisionObject);
- env->CallVoidMethod(javaPhysicsSpace, jmeClasses::PhysicsSpace_addCollisionEvent, javaCollisionObject0, javaCollisionObject1, (jlong) & cp);
- env->DeleteLocalRef(javaPhysicsSpace);
- env->DeleteLocalRef(javaCollisionObject0);
- env->DeleteLocalRef(javaCollisionObject1);
- if (env->ExceptionCheck()) {
- env->Throw(env->ExceptionOccurred());
- return true;
- }
- }
- }
- }
- return true;
-}
-
-btDynamicsWorld* jmePhysicsSpace::getDynamicsWorld() {
- return dynamicsWorld;
-}
-
-jobject jmePhysicsSpace::getJavaPhysicsSpace() {
- return javaPhysicsSpace;
-}
-
-jmePhysicsSpace::~jmePhysicsSpace() {
- delete(dynamicsWorld);
-}
\ No newline at end of file
diff --git a/engine/src/bullet/native/build.xml b/engine/src/bullet/native/build.xml
deleted file mode 100644
index 0fc92893b..000000000
--- a/engine/src/bullet/native/build.xml
+++ /dev/null
@@ -1,310 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/engine/src/bullet/native/bullet-native-build.txt b/engine/src/bullet/native/bullet-native-build.txt
deleted file mode 100644
index e9e4bcd84..000000000
--- a/engine/src/bullet/native/bullet-native-build.txt
+++ /dev/null
@@ -1,169 +0,0 @@
-***********************************
-* Build info for bulletjme *
-* (c) 2011 Normen Hansen *
-***********************************
-
-This document outlines the process of building bullet-jme on different platforms.
-Since bullet-jme is a native java library and bullet gets included statically,
-building requires you to download and build the bullet source first.
-
-
-
-***********************************
-* Building bullet *
-***********************************
-
------------------------------------
-General info
------------------------------------
-Note that the compilation of bullet should not produce dll / so / dylib files
-but static *.a libraries which can later be compiled into the binary of bullet-jme.
-
------------------------------------
-Downloading and extracting bullet
------------------------------------
-Requirements:
-- Bullet source: http://bullet.googlecode.com/
-
-Extract bullet source and build bullet (see below)
-
------------------------------------
-Building on Mac OSX
------------------------------------
-Requirements:
-- Apple Developer tools: http://developer.apple.com/
-- CMake: http://www.cmake.org/ (or via http://www.macports.org)
-
-Commands:
-> cd bullet-trunk
-> cmake -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON \
- -DCMAKE_OSX_ARCHITECTURES='ppc;i386;x86_64' \
- -DBUILD_EXTRAS=off -DBUILD_DEMOS=off -DCMAKE_BUILD_TYPE=Release
-> make
-
------------------------------------
-Building on WINDOWS (MinGW/GCC, Recommended)
------------------------------------
-Requirements:
-- GNU C++ Compiler: http://www.mingw.org/
- http://mingw-w64.sourceforge.net/
-- CMake: http://www.cmake.org/
-
-Commands:
-> cd bullet-trunk
-> cmake . -DBUILD_SHARED_LIBS=OFF -DBUILD_DEMOS:BOOL=OFF -DBUILD_EXTRAS:BOOL=OFF -DCMAKE_BUILD_TYPE=Release . -G "MinGW Makefiles"
-> mingw32-make
-
------------------------------------
-Building on WINDOWS (VisualStudio, untested)
------------------------------------
-Requirements:
-- Microsoft Visual Studio http://msdn.microsoft.com/
-
-Bullet comes with autogenerated Project Files for Microsoft Visual Studio 6, 7, 7.1 and 8.
-The main Workspace/Solution is located in Bullet/msvc/8/wksbullet.sln (replace 8 with your version).
-
-Build the project to create static libraries.
-
-
------------------------------------
-Building bullet on LINUX
------------------------------------
-Requirements:
-- Gnu C++ Compiler: http://gcc.gnu.org/
-- CMake: http://www.cmake.org/ (or via your package manager of choice)
-
-Commands:
-> cd bullet-trunk
-> cmake -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON -DCMAKE_C_FLAGS="-fPIC" -DCMAKE_CXX_FLAGS="-fPIC"\
- -DBUILD_EXTRAS=off -DBUILD_DEMOS=off -DCMAKE_BUILD_TYPE=Release
-> make
-
------------------------------------
-More info on building bullet
------------------------------------
-http://www.bulletphysics.org/mediawiki-1.5.8/index.php?title=Installation
-
-
-
-***********************************
-* Building bulletjme *
-***********************************
-
------------------------------------
-Requirements
------------------------------------
-- Java SDK 1.5+: http://java.sun.com
-- Apache ANT: http://ant.apache.org
-- C++ Compiler: (see below)
-- jme3 Source: http://jmonkeyengine.googlecode.com/
-- Statically compiled bullet source (see above)
-
------------------------------------
-Preparation
------------------------------------
-- copy/link bullet-trunk folder into the same folder where the bullet-jme folder is:
-
-disk
- |
- +-root folder
- |
- +-engine
- |
- +-sdk
- |
- +-bullet-trunk
-
-- You can alter options in the "src/bullet/native/bullet.properties" file, such as the used bullet
- version, native compilation options etc. (see below)
-
------------------------------------
-Building bulletjme native
------------------------------------
-Commands:
-> cd engine
-> ant jar
-> ant build-bullet-natives
-
-Thats all. ANT takes care building native binaries and copies them to th elib directory.
-
-If you get compilation errors, try setting "native.java.include" in the build.properties file to your
-JDK include directory, e.g. /opt/java/include or "c:\Program Files\Java\jdk1.6.0_20\include".
-
------------------------------------
-Altering the native build process
------------------------------------
-bullet-jme uses cpptasks to compile native code.
-
-To change the used compiler, edit the "native.platform.compiler" entry in the
-"build.properties" file. The following c++ compilers work with cpptasks:
-
-gcc GCC C++ compiler
-g++ GCC C++ compiler
-c++ GCC C++ compiler
-msvc Microsoft Visual C++
-bcc Borland C++ Compiler
-icl Intel C++ compiler for Windows (IA-32)
-ecl Intel C++ compiler for Windows (IA-64)
-icc Intel C++ compiler for Linux (IA-32)
-ecc Intel C++ compiler for Linux (IA-64)
-CC Sun ONE C++ compiler
-aCC HP aC++ C++ Compiler
-wcl OpenWatcom C/C++ compiler
-
-In the "nbproject" folder you can find "build-native-platform.xml" files containing the commands
-to compile bullet-jme on different platforms. If you want to alter the process,
-you can copy and modify one of the files and import it in the "build.xml" file instead
-of the old one.
-
------------------------------------
-Netbeans Project
------------------------------------
-The project also includes a Netbeans project to edit and build
-the source in the Netbeans IDE in the /src/bullet/ subfolder.
-
-To have correct syntax highlighting in .cpp/.h files:
-
-- in Netbeans Settings -> C/C++ -> Code Assistance -> C++
- - add bullet-2.77/src as include directories for c++
- - add JAVA_HOME/include as include directories for c++
diff --git a/engine/src/bullet/native/bullet.properties b/engine/src/bullet/native/bullet.properties
deleted file mode 100644
index 0e6a0309a..000000000
--- a/engine/src/bullet/native/bullet.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-#####################################################
-# these are the ant build properties for bullet-jme #
-#####################################################
-bullet.library.name=bulletjme
-bullet.library.version=0.9
-
-# change if bullet folder has different location
-bullet.folder=../bullet-2.79
-
-# compile options
-bullet.compile.debug=false
-
-# native library compilation options
-bullet.osx.compiler=g++
-bullet.osx.syslibroot=/Developer/SDKs/MacOSX10.6.sdk
-# change this to msvc for MS Visual Studio compiler
-bullet.windows.compiler=g++
-bullet.linux.compiler=g++
-bullet.solaris.compiler=g++
-# native header include directories
-bullet.java.include=${java.home}/../include
-# OSX has no JRE, only JDK
-bullet.osx.java.include=/System/Library/Frameworks/JavaVM.framework/Headers
-
-# location of Android NDK
-ndk.dir=/opt/android-ndk-r7
-
-# dont change these..
-bullet.bullet.include=${bullet.folder}/src
-bullet.build.dir=build/bullet/
-bullet.source.dir=src/bullet/native
-bullet.output.base=lib/bullet
-bullet.output.dir=${bullet.output.base}/jarcontent/native
-bullet.jme.dir=dist
-bullet.lib.dir=dist/lib
diff --git a/engine/src/bullet/native/com_jme3_bullet_PhysicsSpace.cpp b/engine/src/bullet/native/com_jme3_bullet_PhysicsSpace.cpp
deleted file mode 100644
index 8116f90a4..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_PhysicsSpace.cpp
+++ /dev/null
@@ -1,450 +0,0 @@
-/*
- * Copyright (c) 2009-2010 jMonkeyEngine
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, 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.
- */
-#include "com_jme3_bullet_PhysicsSpace.h"
-#include "jmePhysicsSpace.h"
-#include "jmeBulletUtil.h"
-
-/**
- * Author: Normen Hansen
- */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- /*
- * Class: com_jme3_bullet_PhysicsSpace
- * Method: createPhysicsSpace
- * Signature: (FFFFFFI)J
- */
- JNIEXPORT jlong JNICALL Java_com_jme3_bullet_PhysicsSpace_createPhysicsSpace
- (JNIEnv * env, jobject object, jfloat minX, jfloat minY, jfloat minZ, jfloat maxX, jfloat maxY, jfloat maxZ, jint broadphase, jboolean threading) {
- jmeClasses::initJavaClasses(env);
- jmePhysicsSpace* space = new jmePhysicsSpace(env, object);
- if (space == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The physics space has not been created.");
- return 0;
- }
- space->createPhysicsSpace(minX, minY, minZ, maxX, maxY, maxZ, broadphase, threading);
- return reinterpret_cast(space);
- }
-
- /*
- * Class: com_jme3_bullet_PhysicsSpace
- * Method: stepSimulation
- * Signature: (JFIF)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_stepSimulation
- (JNIEnv * env, jobject object, jlong spaceId, jfloat tpf, jint maxSteps, jfloat accuracy) {
- jmePhysicsSpace* space = reinterpret_cast(spaceId);
- if (space == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The physics space does not exist.");
- return;
- }
- space->stepSimulation(tpf, maxSteps, accuracy);
- }
-
- /*
- * Class: com_jme3_bullet_PhysicsSpace
- * Method: addCollisionObject
- * Signature: (JJ)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addCollisionObject
- (JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
- jmePhysicsSpace* space = reinterpret_cast(spaceId);
- btCollisionObject* collisionObject = reinterpret_cast(objectId);
- if (space == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The physics space does not exist.");
- return;
- }
- if (collisionObject == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The collision object does not exist.");
- return;
- }
- jmeUserPointer *userPointer = (jmeUserPointer*)collisionObject->getUserPointer();
- userPointer -> space = space;
-
- space->getDynamicsWorld()->addCollisionObject(collisionObject);
- }
-
- /*
- * Class: com_jme3_bullet_PhysicsSpace
- * Method: removeCollisionObject
- * Signature: (JJ)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeCollisionObject
- (JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
- jmePhysicsSpace* space = reinterpret_cast(spaceId);
- btCollisionObject* collisionObject = reinterpret_cast(objectId);
- if (space == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The physics space does not exist.");
- return;
- }
- if (collisionObject == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The collision object does not exist.");
- return;
- }
- space->getDynamicsWorld()->removeCollisionObject(collisionObject);
- jmeUserPointer *userPointer = (jmeUserPointer*)collisionObject->getUserPointer();
- userPointer -> space = NULL;
- }
-
- /*
- * Class: com_jme3_bullet_PhysicsSpace
- * Method: addRigidBody
- * Signature: (JJ)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addRigidBody
- (JNIEnv * env, jobject object, jlong spaceId, jlong rigidBodyId) {
- jmePhysicsSpace* space = reinterpret_cast(spaceId);
- btRigidBody* collisionObject = reinterpret_cast(rigidBodyId);
- if (space == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The physics space does not exist.");
- return;
- }
- if (collisionObject == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The collision object does not exist.");
- return;
- }
- jmeUserPointer *userPointer = (jmeUserPointer*)collisionObject->getUserPointer();
- userPointer -> space = space;
- space->getDynamicsWorld()->addRigidBody(collisionObject);
- }
-
- /*
- * Class: com_jme3_bullet_PhysicsSpace
- * Method: removeRigidBody
- * Signature: (JJ)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeRigidBody
- (JNIEnv * env, jobject object, jlong spaceId, jlong rigidBodyId) {
- jmePhysicsSpace* space = reinterpret_cast(spaceId);
- btRigidBody* collisionObject = reinterpret_cast(rigidBodyId);
- if (space == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The physics space does not exist.");
- return;
- }
- if (collisionObject == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The collision object does not exist.");
- return;
- }
- jmeUserPointer *userPointer = (jmeUserPointer*)collisionObject->getUserPointer();
- userPointer -> space = NULL;
- space->getDynamicsWorld()->removeRigidBody(collisionObject);
- }
-
- /*
- * Class: com_jme3_bullet_PhysicsSpace
- * Method: addCharacterObject
- * Signature: (JJ)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addCharacterObject
- (JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
- jmePhysicsSpace* space = reinterpret_cast(spaceId);
- btCollisionObject* collisionObject = reinterpret_cast(objectId);
- if (space == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The physics space does not exist.");
- return;
- }
- if (collisionObject == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The collision object does not exist.");
- return;
- }
- jmeUserPointer *userPointer = (jmeUserPointer*)collisionObject->getUserPointer();
- userPointer -> space = space;
- space->getDynamicsWorld()->addCollisionObject(collisionObject,
- btBroadphaseProxy::CharacterFilter,
- btBroadphaseProxy::StaticFilter | btBroadphaseProxy::DefaultFilter
- );
- }
-
- /*
- * Class: com_jme3_bullet_PhysicsSpace
- * Method: removeCharacterObject
- * Signature: (JJ)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeCharacterObject
- (JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
- jmePhysicsSpace* space = reinterpret_cast(spaceId);
- btCollisionObject* collisionObject = reinterpret_cast(objectId);
- if (space == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The physics space does not exist.");
- return;
- }
- if (collisionObject == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The collision object does not exist.");
- return;
- }
- jmeUserPointer *userPointer = (jmeUserPointer*)collisionObject->getUserPointer();
- userPointer -> space = NULL;
- space->getDynamicsWorld()->removeCollisionObject(collisionObject);
- }
-
- /*
- * Class: com_jme3_bullet_PhysicsSpace
- * Method: addAction
- * Signature: (JJ)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addAction
- (JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
- jmePhysicsSpace* space = reinterpret_cast(spaceId);
- btActionInterface* actionObject = reinterpret_cast(objectId);
- if (space == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The physics space does not exist.");
- return;
- }
- if (actionObject == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The action object does not exist.");
- return;
- }
- space->getDynamicsWorld()->addAction(actionObject);
- }
-
- /*
- * Class: com_jme3_bullet_PhysicsSpace
- * Method: removeAction
- * Signature: (JJ)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeAction
- (JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
- jmePhysicsSpace* space = reinterpret_cast(spaceId);
- btActionInterface* actionObject = reinterpret_cast(objectId);
- if (space == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The physics space does not exist.");
- return;
- }
- if (actionObject == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The action object does not exist.");
- return;
- }
- space->getDynamicsWorld()->removeAction(actionObject);
- }
-
- /*
- * Class: com_jme3_bullet_PhysicsSpace
- * Method: addVehicle
- * Signature: (JJ)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addVehicle
- (JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
- jmePhysicsSpace* space = reinterpret_cast(spaceId);
- btActionInterface* actionObject = reinterpret_cast(objectId);
- if (space == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The physics space does not exist.");
- return;
- }
- if (actionObject == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The vehicle object does not exist.");
- return;
- }
- space->getDynamicsWorld()->addVehicle(actionObject);
- }
-
- /*
- * Class: com_jme3_bullet_PhysicsSpace
- * Method: removeVehicle
- * Signature: (JJ)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeVehicle
- (JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
- jmePhysicsSpace* space = reinterpret_cast(spaceId);
- btActionInterface* actionObject = reinterpret_cast(objectId);
- if (space == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The physics space does not exist.");
- return;
- }
- if (actionObject == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The action object does not exist.");
- return;
- }
- space->getDynamicsWorld()->removeVehicle(actionObject);
- }
-
- /*
- * Class: com_jme3_bullet_PhysicsSpace
- * Method: addConstraint
- * Signature: (JJ)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addConstraint
- (JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
- jmePhysicsSpace* space = reinterpret_cast(spaceId);
- btTypedConstraint* constraint = reinterpret_cast(objectId);
- if (space == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The physics space does not exist.");
- return;
- }
- if (constraint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The constraint object does not exist.");
- return;
- }
- space->getDynamicsWorld()->addConstraint(constraint);
- }
-
- /*
- * Class: com_jme3_bullet_PhysicsSpace
- * Method: removeConstraint
- * Signature: (JJ)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeConstraint
- (JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
- jmePhysicsSpace* space = reinterpret_cast(spaceId);
- btTypedConstraint* constraint = reinterpret_cast(objectId);
- if (space == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The physics space does not exist.");
- return;
- }
- if (constraint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The constraint object does not exist.");
- return;
- }
- space->getDynamicsWorld()->removeConstraint(constraint);
- }
-
- /*
- * Class: com_jme3_bullet_PhysicsSpace
- * Method: setGravity
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_setGravity
- (JNIEnv * env, jobject object, jlong spaceId, jobject vector) {
- jmePhysicsSpace* space = reinterpret_cast(spaceId);
- if (space == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The physics space does not exist.");
- return;
- }
- btVector3 gravity = btVector3();
- jmeBulletUtil::convert(env, vector, &gravity);
- space->getDynamicsWorld()->setGravity(gravity);
- }
-
- /*
- * Class: com_jme3_bullet_PhysicsSpace
- * Method: initNativePhysics
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_initNativePhysics
- (JNIEnv * env, jclass clazz) {
- jmeClasses::initJavaClasses(env);
- }
-
- /*
- * Class: com_jme3_bullet_PhysicsSpace
- * Method: finalizeNative
- * Signature: (J)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_finalizeNative
- (JNIEnv * env, jobject object, jlong spaceId) {
- jmePhysicsSpace* space = reinterpret_cast(spaceId);
- if (space == NULL) {
- return;
- }
- delete(space);
- }
-
- JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_rayTest_1native
- (JNIEnv * env, jobject object, jobject to, jobject from, jlong spaceId, jobject resultlist) {
-
- jmePhysicsSpace* space = reinterpret_cast (spaceId);
- if (space == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The physics space does not exist.");
- return;
- }
-
- struct AllRayResultCallback : public btCollisionWorld::RayResultCallback {
-
- AllRayResultCallback(const btVector3& rayFromWorld, const btVector3 & rayToWorld) : m_rayFromWorld(rayFromWorld), m_rayToWorld(rayToWorld) {
- }
- jobject resultlist;
- JNIEnv* env;
- btVector3 m_rayFromWorld; //used to calculate hitPointWorld from hitFraction
- btVector3 m_rayToWorld;
-
- btVector3 m_hitNormalWorld;
- btVector3 m_hitPointWorld;
-
- virtual btScalar addSingleResult(btCollisionWorld::LocalRayResult& rayResult, bool normalInWorldSpace) {
- if (normalInWorldSpace) {
- m_hitNormalWorld = rayResult.m_hitNormalLocal;
- } else {
- m_hitNormalWorld = m_collisionObject->getWorldTransform().getBasis() * rayResult.m_hitNormalLocal;
- }
- m_hitPointWorld.setInterpolate3(m_rayFromWorld, m_rayToWorld, rayResult.m_hitFraction);
-
- jmeBulletUtil::addResult(env, resultlist, m_hitNormalWorld, m_hitPointWorld, rayResult.m_hitFraction, rayResult.m_collisionObject);
-
- return 1.f;
- }
- };
-
- btVector3 native_to = btVector3();
- jmeBulletUtil::convert(env, to, &native_to);
-
- btVector3 native_from = btVector3();
- jmeBulletUtil::convert(env, from, &native_from);
-
- AllRayResultCallback resultCallback(native_from, native_to);
- resultCallback.env = env;
- resultCallback.resultlist = resultlist;
- space->getDynamicsWorld()->rayTest(native_from, native_to, resultCallback);
- return;
- }
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_PhysicsSpace.h b/engine/src/bullet/native/com_jme3_bullet_PhysicsSpace.h
deleted file mode 100644
index 3b14a7512..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_PhysicsSpace.h
+++ /dev/null
@@ -1,165 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class com_jme3_bullet_PhysicsSpace */
-
-#ifndef _Included_com_jme3_bullet_PhysicsSpace
-#define _Included_com_jme3_bullet_PhysicsSpace
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef com_jme3_bullet_PhysicsSpace_AXIS_X
-#define com_jme3_bullet_PhysicsSpace_AXIS_X 0L
-#undef com_jme3_bullet_PhysicsSpace_AXIS_Y
-#define com_jme3_bullet_PhysicsSpace_AXIS_Y 1L
-#undef com_jme3_bullet_PhysicsSpace_AXIS_Z
-#define com_jme3_bullet_PhysicsSpace_AXIS_Z 2L
-/* Inaccessible static: pQueueTL */
-/* Inaccessible static: physicsSpaceTL */
-/*
- * Class: com_jme3_bullet_PhysicsSpace
- * Method: createPhysicsSpace
- * Signature: (FFFFFFIZ)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_PhysicsSpace_createPhysicsSpace
- (JNIEnv *, jobject, jfloat, jfloat, jfloat, jfloat, jfloat, jfloat, jint, jboolean);
-
-/*
- * Class: com_jme3_bullet_PhysicsSpace
- * Method: stepSimulation
- * Signature: (JFIF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_stepSimulation
- (JNIEnv *, jobject, jlong, jfloat, jint, jfloat);
-
-/*
- * Class: com_jme3_bullet_PhysicsSpace
- * Method: addCollisionObject
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addCollisionObject
- (JNIEnv *, jobject, jlong, jlong);
-
-/*
- * Class: com_jme3_bullet_PhysicsSpace
- * Method: removeCollisionObject
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeCollisionObject
- (JNIEnv *, jobject, jlong, jlong);
-
-/*
- * Class: com_jme3_bullet_PhysicsSpace
- * Method: addRigidBody
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addRigidBody
- (JNIEnv *, jobject, jlong, jlong);
-
-/*
- * Class: com_jme3_bullet_PhysicsSpace
- * Method: removeRigidBody
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeRigidBody
- (JNIEnv *, jobject, jlong, jlong);
-
-/*
- * Class: com_jme3_bullet_PhysicsSpace
- * Method: addCharacterObject
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addCharacterObject
- (JNIEnv *, jobject, jlong, jlong);
-
-/*
- * Class: com_jme3_bullet_PhysicsSpace
- * Method: removeCharacterObject
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeCharacterObject
- (JNIEnv *, jobject, jlong, jlong);
-
-/*
- * Class: com_jme3_bullet_PhysicsSpace
- * Method: addAction
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addAction
- (JNIEnv *, jobject, jlong, jlong);
-
-/*
- * Class: com_jme3_bullet_PhysicsSpace
- * Method: removeAction
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeAction
- (JNIEnv *, jobject, jlong, jlong);
-
-/*
- * Class: com_jme3_bullet_PhysicsSpace
- * Method: addVehicle
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addVehicle
- (JNIEnv *, jobject, jlong, jlong);
-
-/*
- * Class: com_jme3_bullet_PhysicsSpace
- * Method: removeVehicle
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeVehicle
- (JNIEnv *, jobject, jlong, jlong);
-
-/*
- * Class: com_jme3_bullet_PhysicsSpace
- * Method: addConstraint
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addConstraint
- (JNIEnv *, jobject, jlong, jlong);
-
-/*
- * Class: com_jme3_bullet_PhysicsSpace
- * Method: removeConstraint
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeConstraint
- (JNIEnv *, jobject, jlong, jlong);
-
-/*
- * Class: com_jme3_bullet_PhysicsSpace
- * Method: setGravity
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_setGravity
- (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class: com_jme3_bullet_PhysicsSpace
- * Method: rayTest_native
- * Signature: (Lcom/jme3/math/Vector3f;Lcom/jme3/math/Vector3f;JLjava/util/List;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_rayTest_1native
- (JNIEnv *, jobject, jobject, jobject, jlong, jobject);
-
-/*
- * Class: com_jme3_bullet_PhysicsSpace
- * Method: initNativePhysics
- * Signature: ()V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_initNativePhysics
- (JNIEnv *, jclass);
-
-/*
- * Class: com_jme3_bullet_PhysicsSpace
- * Method: finalizeNative
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_finalizeNative
- (JNIEnv *, jobject, jlong);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_collision_PhysicsCollisionEvent.cpp b/engine/src/bullet/native/com_jme3_bullet_collision_PhysicsCollisionEvent.cpp
deleted file mode 100644
index e9199d496..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_collision_PhysicsCollisionEvent.cpp
+++ /dev/null
@@ -1,308 +0,0 @@
-#include "jmeBulletUtil.h"
-#include "BulletCollision/NarrowPhaseCollision/btManifoldPoint.h"
-#include "com_jme3_bullet_collision_PhysicsCollisionEvent.h"
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionEvent
- * Method: getAppliedImpulse
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getAppliedImpulse
- (JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
- btManifoldPoint* mp = reinterpret_cast(manifoldPointObjectId);
- if (mp == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The manifoldPoint does not exist.");
- return 0;
- }
- return mp -> m_appliedImpulse;
-}
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionEvent
- * Method: getAppliedImpulseLateral1
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getAppliedImpulseLateral1
- (JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
- btManifoldPoint* mp = reinterpret_cast(manifoldPointObjectId);
- if (mp == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The manifoldPoint does not exist.");
- return 0;
- }
- return mp -> m_appliedImpulseLateral1;
-}
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionEvent
- * Method: getAppliedImpulseLateral2
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getAppliedImpulseLateral2
- (JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
- btManifoldPoint* mp = reinterpret_cast(manifoldPointObjectId);
- if (mp == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The manifoldPoint does not exist.");
- return 0;
- }
- return mp -> m_appliedImpulseLateral2;
-}
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionEvent
- * Method: getCombinedFriction
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getCombinedFriction
- (JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
- btManifoldPoint* mp = reinterpret_cast(manifoldPointObjectId);
- if (mp == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The manifoldPoint does not exist.");
- return 0;
- }
- return mp -> m_combinedFriction;
-}
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionEvent
- * Method: getCombinedRestitution
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getCombinedRestitution
- (JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
- btManifoldPoint* mp = reinterpret_cast(manifoldPointObjectId);
- if (mp == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The manifoldPoint does not exist.");
- return 0;
- }
- return mp -> m_combinedRestitution;
-}
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionEvent
- * Method: getDistance1
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getDistance1
- (JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
- btManifoldPoint* mp = reinterpret_cast(manifoldPointObjectId);
- if (mp == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The manifoldPoint does not exist.");
- return 0;
- }
- return mp -> m_distance1;
-}
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionEvent
- * Method: getIndex0
- * Signature: (J)I
- */
-JNIEXPORT jint JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getIndex0
- (JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
- btManifoldPoint* mp = reinterpret_cast(manifoldPointObjectId);
- if (mp == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The manifoldPoint does not exist.");
- return 0;
- }
- return mp -> m_index0;
-}
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionEvent
- * Method: getIndex1
- * Signature: (J)I
- */
-JNIEXPORT jint JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getIndex1
- (JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
- btManifoldPoint* mp = reinterpret_cast(manifoldPointObjectId);
- if (mp == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The manifoldPoint does not exist.");
- return 0;
- }
- return mp -> m_index1;
-}
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionEvent
- * Method: getLateralFrictionDir1
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getLateralFrictionDir1
- (JNIEnv * env, jobject object, jlong manifoldPointObjectId, jobject lateralFrictionDir1) {
- btManifoldPoint* mp = reinterpret_cast(manifoldPointObjectId);
- if (mp == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The manifoldPoint does not exist.");
- return;
- }
- jmeBulletUtil::convert(env, &mp -> m_lateralFrictionDir1, lateralFrictionDir1);
-}
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionEvent
- * Method: getLateralFrictionDir2
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getLateralFrictionDir2
- (JNIEnv * env, jobject object, jlong manifoldPointObjectId, jobject lateralFrictionDir2) {
- btManifoldPoint* mp = reinterpret_cast(manifoldPointObjectId);
- if (mp == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The manifoldPoint does not exist.");
- return;
- }
- jmeBulletUtil::convert(env, &mp -> m_lateralFrictionDir2, lateralFrictionDir2);
-}
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionEvent
- * Method: isLateralFrictionInitialized
- * Signature: (J)Z
- */
-JNIEXPORT jboolean JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_isLateralFrictionInitialized
- (JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
- btManifoldPoint* mp = reinterpret_cast(manifoldPointObjectId);
- if (mp == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The manifoldPoint does not exist.");
- return 0;
- }
- return mp -> m_lateralFrictionInitialized;
-}
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionEvent
- * Method: getLifeTime
- * Signature: (J)I
- */
-JNIEXPORT jint JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getLifeTime
- (JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
- btManifoldPoint* mp = reinterpret_cast(manifoldPointObjectId);
- if (mp == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The manifoldPoint does not exist.");
- return 0;
- }
- return mp -> m_lifeTime;
-}
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionEvent
- * Method: getLocalPointA
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getLocalPointA
- (JNIEnv * env, jobject object, jlong manifoldPointObjectId, jobject localPointA) {
- btManifoldPoint* mp = reinterpret_cast(manifoldPointObjectId);
- if (mp == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The manifoldPoint does not exist.");
- return;
- }
- jmeBulletUtil::convert(env, &mp -> m_localPointA, localPointA);
-}
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionEvent
- * Method: getLocalPointB
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getLocalPointB
- (JNIEnv * env, jobject object, jlong manifoldPointObjectId, jobject localPointB) {
- btManifoldPoint* mp = reinterpret_cast(manifoldPointObjectId);
- if (mp == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The manifoldPoint does not exist.");
- return;
- }
- jmeBulletUtil::convert(env, &mp -> m_localPointB, localPointB);
-}
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionEvent
- * Method: getNormalWorldOnB
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getNormalWorldOnB
- (JNIEnv * env, jobject object, jlong manifoldPointObjectId, jobject normalWorldOnB) {
- btManifoldPoint* mp = reinterpret_cast(manifoldPointObjectId);
- if (mp == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The manifoldPoint does not exist.");
- return;
- }
- jmeBulletUtil::convert(env, &mp -> m_normalWorldOnB, normalWorldOnB);
-}
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionEvent
- * Method: getPartId0
- * Signature: (J)I
- */
-JNIEXPORT jint JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getPartId0
- (JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
- btManifoldPoint* mp = reinterpret_cast(manifoldPointObjectId);
- if (mp == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The manifoldPoint does not exist.");
- return 0;
- }
- return mp -> m_partId0;
-}
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionEvent
- * Method: getPartId1
- * Signature: (J)I
- */
-JNIEXPORT jint JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getPartId1
- (JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
- btManifoldPoint* mp = reinterpret_cast(manifoldPointObjectId);
- if (mp == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The manifoldPoint does not exist.");
- return 0;
- }
- return mp -> m_partId1;
-}
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionEvent
- * Method: getPositionWorldOnA
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getPositionWorldOnA
- (JNIEnv * env, jobject object, jlong manifoldPointObjectId, jobject positionWorldOnA) {
- btManifoldPoint* mp = reinterpret_cast(manifoldPointObjectId);
- if (mp == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The manifoldPoint does not exist.");
- return;
- }
- jmeBulletUtil::convert(env, &mp -> m_positionWorldOnA, positionWorldOnA);
-}
-
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionEvent
- * Method: getPositionWorldOnB
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getPositionWorldOnB
- (JNIEnv * env, jobject object, jlong manifoldPointObjectId, jobject positionWorldOnB) {
- btManifoldPoint* mp = reinterpret_cast(manifoldPointObjectId);
- if (mp == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The manifoldPoint does not exist.");
- return;
- }
- jmeBulletUtil::convert(env, &mp -> m_positionWorldOnB, positionWorldOnB);
-}
diff --git a/engine/src/bullet/native/com_jme3_bullet_collision_PhysicsCollisionEvent.h b/engine/src/bullet/native/com_jme3_bullet_collision_PhysicsCollisionEvent.h
deleted file mode 100644
index 2dd9dcf3b..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_collision_PhysicsCollisionEvent.h
+++ /dev/null
@@ -1,173 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class com_jme3_bullet_collision_PhysicsCollisionEvent */
-
-#ifndef _Included_com_jme3_bullet_collision_PhysicsCollisionEvent
-#define _Included_com_jme3_bullet_collision_PhysicsCollisionEvent
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef com_jme3_bullet_collision_PhysicsCollisionEvent_serialVersionUID
-#define com_jme3_bullet_collision_PhysicsCollisionEvent_serialVersionUID 5516075349620653480LL
-#undef com_jme3_bullet_collision_PhysicsCollisionEvent_TYPE_ADDED
-#define com_jme3_bullet_collision_PhysicsCollisionEvent_TYPE_ADDED 0L
-#undef com_jme3_bullet_collision_PhysicsCollisionEvent_TYPE_PROCESSED
-#define com_jme3_bullet_collision_PhysicsCollisionEvent_TYPE_PROCESSED 1L
-#undef com_jme3_bullet_collision_PhysicsCollisionEvent_TYPE_DESTROYED
-#define com_jme3_bullet_collision_PhysicsCollisionEvent_TYPE_DESTROYED 2L
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionEvent
- * Method: getAppliedImpulse
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getAppliedImpulse
- (JNIEnv *, jobject, jlong);
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionEvent
- * Method: getAppliedImpulseLateral1
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getAppliedImpulseLateral1
- (JNIEnv *, jobject, jlong);
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionEvent
- * Method: getAppliedImpulseLateral2
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getAppliedImpulseLateral2
- (JNIEnv *, jobject, jlong);
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionEvent
- * Method: getCombinedFriction
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getCombinedFriction
- (JNIEnv *, jobject, jlong);
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionEvent
- * Method: getCombinedRestitution
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getCombinedRestitution
- (JNIEnv *, jobject, jlong);
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionEvent
- * Method: getDistance1
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getDistance1
- (JNIEnv *, jobject, jlong);
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionEvent
- * Method: getIndex0
- * Signature: (J)I
- */
-JNIEXPORT jint JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getIndex0
- (JNIEnv *, jobject, jlong);
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionEvent
- * Method: getIndex1
- * Signature: (J)I
- */
-JNIEXPORT jint JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getIndex1
- (JNIEnv *, jobject, jlong);
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionEvent
- * Method: getLateralFrictionDir1
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getLateralFrictionDir1
- (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionEvent
- * Method: getLateralFrictionDir2
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getLateralFrictionDir2
- (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionEvent
- * Method: isLateralFrictionInitialized
- * Signature: (J)Z
- */
-JNIEXPORT jboolean JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_isLateralFrictionInitialized
- (JNIEnv *, jobject, jlong);
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionEvent
- * Method: getLifeTime
- * Signature: (J)I
- */
-JNIEXPORT jint JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getLifeTime
- (JNIEnv *, jobject, jlong);
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionEvent
- * Method: getLocalPointA
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getLocalPointA
- (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionEvent
- * Method: getLocalPointB
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getLocalPointB
- (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionEvent
- * Method: getNormalWorldOnB
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getNormalWorldOnB
- (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionEvent
- * Method: getPartId0
- * Signature: (J)I
- */
-JNIEXPORT jint JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getPartId0
- (JNIEnv *, jobject, jlong);
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionEvent
- * Method: getPartId1
- * Signature: (J)I
- */
-JNIEXPORT jint JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getPartId1
- (JNIEnv *, jobject, jlong);
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionEvent
- * Method: getPositionWorldOnA
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getPositionWorldOnA
- (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionEvent
- * Method: getPositionWorldOnB
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getPositionWorldOnB
- (JNIEnv *, jobject, jlong, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_collision_PhysicsCollisionObject.cpp b/engine/src/bullet/native/com_jme3_bullet_collision_PhysicsCollisionObject.cpp
deleted file mode 100644
index 5dc75b355..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_collision_PhysicsCollisionObject.cpp
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright (c) 2009-2010 jMonkeyEngine
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, 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.
- */
-
-/**
- * Author: Normen Hansen
- */
-#include "com_jme3_bullet_collision_PhysicsCollisionObject.h"
-#include "jmeBulletUtil.h"
-#include "jmePhysicsSpace.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- /*
- * Class: com_jme3_bullet_collision_PhysicsCollisionObject
- * Method: attachCollisionShape
- * Signature: (JJ)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionObject_attachCollisionShape
- (JNIEnv * env, jobject object, jlong objectId, jlong shapeId) {
- btCollisionObject* collisionObject = reinterpret_cast(objectId);
- if (collisionObject == NULL) {
- jclass newExc = env->FindClass("java/lang/IllegalStateException");
- env->ThrowNew(newExc, "The collision object does not exist.");
- return;
- }
- btCollisionShape* collisionShape = reinterpret_cast(shapeId);
- if (collisionShape == NULL) {
- jclass newExc = env->FindClass("java/lang/IllegalStateException");
- env->ThrowNew(newExc, "The collision shape does not exist.");
- return;
- }
- collisionObject->setCollisionShape(collisionShape);
- }
-
- /*
- * Class: com_jme3_bullet_collision_PhysicsCollisionObject
- * Method: finalizeNative
- * Signature: (J)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionObject_finalizeNative
- (JNIEnv * env, jobject object, jlong objectId) {
- btCollisionObject* collisionObject = reinterpret_cast(objectId);
- if (collisionObject == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- if (collisionObject -> getUserPointer() != NULL){
- jmeUserPointer *userPointer = (jmeUserPointer*)collisionObject->getUserPointer();
- delete(userPointer);
- }
- delete(collisionObject);
- }
- /*
- * Class: com_jme3_bullet_collision_PhysicsCollisionObject
- * Method: initUserPointer
- * Signature: (JII)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionObject_initUserPointer
- (JNIEnv *env, jobject object, jlong objectId, jint group, jint groups) {
- btCollisionObject* collisionObject = reinterpret_cast(objectId);
- if (collisionObject == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- jmeUserPointer *userPointer = (jmeUserPointer*)collisionObject->getUserPointer();
- if (userPointer != NULL) {
-// delete(userPointer);
- }
- userPointer = new jmeUserPointer();
- userPointer -> javaCollisionObject = env->NewWeakGlobalRef(object);
- userPointer -> group = group;
- userPointer -> groups = groups;
- userPointer -> space = NULL;
- collisionObject -> setUserPointer(userPointer);
- }
- /*
- * Class: com_jme3_bullet_collision_PhysicsCollisionObject
- * Method: setCollisionGroup
- * Signature: (JI)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionObject_setCollisionGroup
- (JNIEnv *env, jobject object, jlong objectId, jint group) {
- btCollisionObject* collisionObject = reinterpret_cast(objectId);
- if (collisionObject == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- jmeUserPointer *userPointer = (jmeUserPointer*)collisionObject->getUserPointer();
- if (userPointer != NULL){
- userPointer -> group = group;
- }
- }
- /*
- * Class: com_jme3_bullet_collision_PhysicsCollisionObject
- * Method: setCollideWithGroups
- * Signature: (JI)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionObject_setCollideWithGroups
- (JNIEnv *env, jobject object, jlong objectId, jint groups) {
- btCollisionObject* collisionObject = reinterpret_cast(objectId);
- if (collisionObject == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- jmeUserPointer *userPointer = (jmeUserPointer*)collisionObject->getUserPointer();
- if (userPointer != NULL){
- userPointer -> groups = groups;
- }
- }
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_collision_PhysicsCollisionObject.h b/engine/src/bullet/native/com_jme3_bullet_collision_PhysicsCollisionObject.h
deleted file mode 100644
index db5bf7aaf..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_collision_PhysicsCollisionObject.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class com_jme3_bullet_collision_PhysicsCollisionObject */
-
-#ifndef _Included_com_jme3_bullet_collision_PhysicsCollisionObject
-#define _Included_com_jme3_bullet_collision_PhysicsCollisionObject
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_NONE
-#define com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_NONE 0L
-#undef com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_01
-#define com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_01 1L
-#undef com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_02
-#define com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_02 2L
-#undef com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_03
-#define com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_03 4L
-#undef com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_04
-#define com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_04 8L
-#undef com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_05
-#define com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_05 16L
-#undef com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_06
-#define com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_06 32L
-#undef com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_07
-#define com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_07 64L
-#undef com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_08
-#define com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_08 128L
-#undef com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_09
-#define com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_09 256L
-#undef com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_10
-#define com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_10 512L
-#undef com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_11
-#define com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_11 1024L
-#undef com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_12
-#define com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_12 2048L
-#undef com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_13
-#define com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_13 4096L
-#undef com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_14
-#define com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_14 8192L
-#undef com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_15
-#define com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_15 16384L
-#undef com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_16
-#define com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_16 32768L
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionObject
- * Method: initUserPointer
- * Signature: (JII)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionObject_initUserPointer
- (JNIEnv *, jobject, jlong, jint, jint);
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionObject
- * Method: attachCollisionShape
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionObject_attachCollisionShape
- (JNIEnv *, jobject, jlong, jlong);
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionObject
- * Method: setCollisionGroup
- * Signature: (JI)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionObject_setCollisionGroup
- (JNIEnv *, jobject, jlong, jint);
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionObject
- * Method: setCollideWithGroups
- * Signature: (JI)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionObject_setCollideWithGroups
- (JNIEnv *, jobject, jlong, jint);
-
-/*
- * Class: com_jme3_bullet_collision_PhysicsCollisionObject
- * Method: finalizeNative
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionObject_finalizeNative
- (JNIEnv *, jobject, jlong);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_BoxCollisionShape.cpp b/engine/src/bullet/native/com_jme3_bullet_collision_shapes_BoxCollisionShape.cpp
deleted file mode 100644
index 3d2f0e3dc..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_BoxCollisionShape.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2009-2010 jMonkeyEngine
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, 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.
- */
-
-/**
- * Author: Normen Hansen
- */
-#include "com_jme3_bullet_collision_shapes_BoxCollisionShape.h"
-#include "jmeBulletUtil.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- /*
- * Class: com_jme3_bullet_collision_shapes_BoxCollisionShape
- * Method: createShape
- * Signature: (Lcom/jme3/math/Vector3f;)J
- */
- JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_BoxCollisionShape_createShape
- (JNIEnv *env, jobject object, jobject halfExtents) {
- jmeClasses::initJavaClasses(env);
- btVector3 extents = btVector3();
- jmeBulletUtil::convert(env, halfExtents, &extents);
- btBoxShape* shape = new btBoxShape(extents);
- return reinterpret_cast(shape);
- }
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_BoxCollisionShape.h b/engine/src/bullet/native/com_jme3_bullet_collision_shapes_BoxCollisionShape.h
deleted file mode 100644
index 5602a0dd3..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_BoxCollisionShape.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class com_jme3_bullet_collision_shapes_BoxCollisionShape */
-
-#ifndef _Included_com_jme3_bullet_collision_shapes_BoxCollisionShape
-#define _Included_com_jme3_bullet_collision_shapes_BoxCollisionShape
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: com_jme3_bullet_collision_shapes_BoxCollisionShape
- * Method: createShape
- * Signature: (Lcom/jme3/math/Vector3f;)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_BoxCollisionShape_createShape
- (JNIEnv *, jobject, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_CapsuleCollisionShape.cpp b/engine/src/bullet/native/com_jme3_bullet_collision_shapes_CapsuleCollisionShape.cpp
deleted file mode 100644
index b3d4a8ed5..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_CapsuleCollisionShape.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 2009-2010 jMonkeyEngine
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, 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.
- */
-
-/**
- * Author: Normen Hansen
- */
-#include "com_jme3_bullet_collision_shapes_CapsuleCollisionShape.h"
-#include "jmeBulletUtil.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- /*
- * Class: com_jme3_bullet_collision_shapes_CapsuleCollisionShape
- * Method: createShape
- * Signature: (IFF)J
- */
- JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_CapsuleCollisionShape_createShape
- (JNIEnv * env, jobject object, jint axis, jfloat radius, jfloat height) {
- jmeClasses::initJavaClasses(env);
- btCollisionShape* shape;
- switch(axis){
- case 0:
- shape = new btCapsuleShapeX(radius, height);
- break;
- case 1:
- shape = new btCapsuleShape(radius, height);
- break;
- case 2:
- shape = new btCapsuleShapeZ(radius, height);
- break;
- }
- return reinterpret_cast(shape);
- }
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_CapsuleCollisionShape.h b/engine/src/bullet/native/com_jme3_bullet_collision_shapes_CapsuleCollisionShape.h
deleted file mode 100644
index 4d706748d..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_CapsuleCollisionShape.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class com_jme3_bullet_collision_shapes_CapsuleCollisionShape */
-
-#ifndef _Included_com_jme3_bullet_collision_shapes_CapsuleCollisionShape
-#define _Included_com_jme3_bullet_collision_shapes_CapsuleCollisionShape
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: com_jme3_bullet_collision_shapes_CapsuleCollisionShape
- * Method: createShape
- * Signature: (IFF)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_CapsuleCollisionShape_createShape
- (JNIEnv *, jobject, jint, jfloat, jfloat);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_CollisionShape.cpp b/engine/src/bullet/native/com_jme3_bullet_collision_shapes_CollisionShape.cpp
deleted file mode 100644
index efd7990e0..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_CollisionShape.cpp
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (c) 2009-2010 jMonkeyEngine
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, 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.
- */
-
-/**
- * Author: Normen Hansen
- */
-#include "com_jme3_bullet_collision_shapes_CollisionShape.h"
-#include "jmeBulletUtil.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- /*
- * Class: com_jme3_bullet_collision_shapes_CollisionShape
- * Method: getMargin
- * Signature: (J)F
- */
- JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_shapes_CollisionShape_getMargin
- (JNIEnv * env, jobject object, jlong shapeId) {
- btCollisionShape* shape = reinterpret_cast(shapeId);
- if (shape == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- return shape->getMargin();
- }
-
- /*
- * Class: com_jme3_bullet_collision_shapes_CollisionShape
- * Method: setLocalScaling
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_shapes_CollisionShape_setLocalScaling
- (JNIEnv * env, jobject object, jlong shapeId, jobject scale) {
- btCollisionShape* shape = reinterpret_cast(shapeId);
- if (shape == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- btVector3 scl = btVector3();
- jmeBulletUtil::convert(env, scale, &scl);
- shape->setLocalScaling(scl);
- }
-
- /*
- * Class: com_jme3_bullet_collision_shapes_CollisionShape
- * Method: setMargin
- * Signature: (JF)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_shapes_CollisionShape_setMargin
- (JNIEnv * env, jobject object, jlong shapeId, jfloat newMargin) {
- btCollisionShape* shape = reinterpret_cast(shapeId);
- if (shape == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- shape->setMargin(newMargin);
- }
-
- /*
- * Class: com_jme3_bullet_collision_shapes_CollisionShape
- * Method: finalizeNative
- * Signature: (J)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_shapes_CollisionShape_finalizeNative
- (JNIEnv * env, jobject object, jlong shapeId) {
- btCollisionShape* shape = reinterpret_cast(shapeId);
- if (shape == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- delete(shape);
- }
-#ifdef __cplusplus
-}
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_CollisionShape.h b/engine/src/bullet/native/com_jme3_bullet_collision_shapes_CollisionShape.h
deleted file mode 100644
index cd5d70f21..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_CollisionShape.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class com_jme3_bullet_collision_shapes_CollisionShape */
-
-#ifndef _Included_com_jme3_bullet_collision_shapes_CollisionShape
-#define _Included_com_jme3_bullet_collision_shapes_CollisionShape
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: com_jme3_bullet_collision_shapes_CollisionShape
- * Method: getMargin
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_shapes_CollisionShape_getMargin
- (JNIEnv *, jobject, jlong);
-
-/*
- * Class: com_jme3_bullet_collision_shapes_CollisionShape
- * Method: setLocalScaling
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_shapes_CollisionShape_setLocalScaling
- (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class: com_jme3_bullet_collision_shapes_CollisionShape
- * Method: setMargin
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_shapes_CollisionShape_setMargin
- (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class: com_jme3_bullet_collision_shapes_CollisionShape
- * Method: finalizeNative
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_shapes_CollisionShape_finalizeNative
- (JNIEnv *, jobject, jlong);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_CompoundCollisionShape.cpp b/engine/src/bullet/native/com_jme3_bullet_collision_shapes_CompoundCollisionShape.cpp
deleted file mode 100644
index 52821757b..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_CompoundCollisionShape.cpp
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 2009-2010 jMonkeyEngine
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, 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.
- */
-
-/**
- * Author: Normen Hansen
- */
-#include "com_jme3_bullet_collision_shapes_CompoundCollisionShape.h"
-#include "jmeBulletUtil.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Class: com_jme3_bullet_collision_shapes_CompoundCollisionShape
- * Method: createShape
- * Signature: ()J
- */
- JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_CompoundCollisionShape_createShape
- (JNIEnv *env, jobject object) {
- jmeClasses::initJavaClasses(env);
- btCompoundShape* shape = new btCompoundShape();
- return reinterpret_cast(shape);
- }
-
- /*
- * Class: com_jme3_bullet_collision_shapes_CompoundCollisionShape
- * Method: addChildShape
- * Signature: (JJLcom/jme3/math/Vector3f;Lcom/jme3/math/Matrix3f;)J
- */
- JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_CompoundCollisionShape_addChildShape
- (JNIEnv *env, jobject object, jlong compoundId, jlong childId, jobject childLocation, jobject childRotation) {
- btCompoundShape* shape = reinterpret_cast(compoundId);
- if (shape == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- btCollisionShape* child = reinterpret_cast(childId);
- if (shape == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- btMatrix3x3 mtx = btMatrix3x3();
- btTransform trans = btTransform(mtx);
- jmeBulletUtil::convert(env, childLocation, &trans.getOrigin());
- jmeBulletUtil::convert(env, childRotation, &trans.getBasis());
- shape->addChildShape(trans, child);
- return 0;
- }
-
- /*
- * Class: com_jme3_bullet_collision_shapes_CompoundCollisionShape
- * Method: removeChildShape
- * Signature: (JJ)J
- */
- JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_CompoundCollisionShape_removeChildShape
- (JNIEnv * env, jobject object, jlong compoundId, jlong childId) {
- btCompoundShape* shape = reinterpret_cast(compoundId);
- if (shape == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- btCollisionShape* child = reinterpret_cast(childId);
- if (shape == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- shape->removeChildShape(child);
- return 0;
- }
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_CompoundCollisionShape.h b/engine/src/bullet/native/com_jme3_bullet_collision_shapes_CompoundCollisionShape.h
deleted file mode 100644
index 18783ce1d..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_CompoundCollisionShape.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class com_jme3_bullet_collision_shapes_CompoundCollisionShape */
-
-#ifndef _Included_com_jme3_bullet_collision_shapes_CompoundCollisionShape
-#define _Included_com_jme3_bullet_collision_shapes_CompoundCollisionShape
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: com_jme3_bullet_collision_shapes_CompoundCollisionShape
- * Method: createShape
- * Signature: ()J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_CompoundCollisionShape_createShape
- (JNIEnv *, jobject);
-
-/*
- * Class: com_jme3_bullet_collision_shapes_CompoundCollisionShape
- * Method: addChildShape
- * Signature: (JJLcom/jme3/math/Vector3f;Lcom/jme3/math/Matrix3f;)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_CompoundCollisionShape_addChildShape
- (JNIEnv *, jobject, jlong, jlong, jobject, jobject);
-
-/*
- * Class: com_jme3_bullet_collision_shapes_CompoundCollisionShape
- * Method: removeChildShape
- * Signature: (JJ)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_CompoundCollisionShape_removeChildShape
- (JNIEnv *, jobject, jlong, jlong);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_ConeCollisionShape.cpp b/engine/src/bullet/native/com_jme3_bullet_collision_shapes_ConeCollisionShape.cpp
deleted file mode 100644
index 06de8ddaf..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_ConeCollisionShape.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 2009-2010 jMonkeyEngine
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, 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.
- */
-
-/**
- * Author: Normen Hansen
- */
-#include "com_jme3_bullet_collision_shapes_ConeCollisionShape.h"
-#include "jmeBulletUtil.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- /*
- * Class: com_jme3_bullet_collision_shapes_ConeCollisionShape
- * Method: createShape
- * Signature: (IFF)J
- */
- JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_ConeCollisionShape_createShape
- (JNIEnv * env, jobject object, jint axis, jfloat radius, jfloat height) {
- jmeClasses::initJavaClasses(env);
- btCollisionShape* shape;
- switch (axis) {
- case 0:
- shape = new btConeShapeX(radius, height);
- break;
- case 1:
- shape = new btConeShape(radius, height);
- break;
- case 2:
- shape = new btConeShapeZ(radius, height);
- break;
- }
- return reinterpret_cast(shape);
- }
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_ConeCollisionShape.h b/engine/src/bullet/native/com_jme3_bullet_collision_shapes_ConeCollisionShape.h
deleted file mode 100644
index 711276ebb..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_ConeCollisionShape.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class com_jme3_bullet_collision_shapes_ConeCollisionShape */
-
-#ifndef _Included_com_jme3_bullet_collision_shapes_ConeCollisionShape
-#define _Included_com_jme3_bullet_collision_shapes_ConeCollisionShape
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: com_jme3_bullet_collision_shapes_ConeCollisionShape
- * Method: createShape
- * Signature: (IFF)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_ConeCollisionShape_createShape
- (JNIEnv *, jobject, jint, jfloat, jfloat);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_CylinderCollisionShape.cpp b/engine/src/bullet/native/com_jme3_bullet_collision_shapes_CylinderCollisionShape.cpp
deleted file mode 100644
index fd82f13a3..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_CylinderCollisionShape.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2009-2010 jMonkeyEngine
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, 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.
- */
-
-/**
- * Author: Normen Hansen
- */
-#include "com_jme3_bullet_collision_shapes_CylinderCollisionShape.h"
-#include "jmeBulletUtil.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- /*
- * Class: com_jme3_bullet_collision_shapes_CylinderCollisionShape
- * Method: createShape
- * Signature: (ILcom/jme3/math/Vector3f;)J
- */
- JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_CylinderCollisionShape_createShape
- (JNIEnv * env, jobject object, jint axis, jobject halfExtents) {
- jmeClasses::initJavaClasses(env);
- btVector3 extents = btVector3();
- jmeBulletUtil::convert(env, halfExtents, &extents);
- btCollisionShape* shape;
- switch (axis) {
- case 0:
- shape = new btCylinderShapeX(extents);
- break;
- case 1:
- shape = new btCylinderShape(extents);
- break;
- case 2:
- shape = new btCylinderShapeZ(extents);
- break;
- }
- return reinterpret_cast(shape);
- }
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_CylinderCollisionShape.h b/engine/src/bullet/native/com_jme3_bullet_collision_shapes_CylinderCollisionShape.h
deleted file mode 100644
index 48a665ac7..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_CylinderCollisionShape.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class com_jme3_bullet_collision_shapes_CylinderCollisionShape */
-
-#ifndef _Included_com_jme3_bullet_collision_shapes_CylinderCollisionShape
-#define _Included_com_jme3_bullet_collision_shapes_CylinderCollisionShape
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: com_jme3_bullet_collision_shapes_CylinderCollisionShape
- * Method: createShape
- * Signature: (ILcom/jme3/math/Vector3f;)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_CylinderCollisionShape_createShape
- (JNIEnv *, jobject, jint, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_GImpactCollisionShape.cpp b/engine/src/bullet/native/com_jme3_bullet_collision_shapes_GImpactCollisionShape.cpp
deleted file mode 100644
index 43ceb3d56..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_GImpactCollisionShape.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2009-2010 jMonkeyEngine
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, 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.
- */
-
-/**
- * Author: Normen Hansen
- */
-#include "com_jme3_bullet_collision_shapes_GImpactCollisionShape.h"
-#include "jmeBulletUtil.h"
-#include
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- /*
- * Class: com_jme3_bullet_collision_shapes_GImpactCollisionShape
- * Method: createShape
- * Signature: (J)J
- */
- JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_GImpactCollisionShape_createShape
- (JNIEnv * env, jobject object, jlong meshId) {
- jmeClasses::initJavaClasses(env);
- btTriangleIndexVertexArray* array = reinterpret_cast(meshId);
- btGImpactMeshShape* shape = new btGImpactMeshShape(array);
- return reinterpret_cast(shape);
- }
-
- /*
- * Class: com_jme3_bullet_collision_shapes_GImpactCollisionShape
- * Method: finalizeNative
- * Signature: (J)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_shapes_GImpactCollisionShape_finalizeNative
- (JNIEnv * env, jobject object, jlong meshId) {
- btTriangleIndexVertexArray* array = reinterpret_cast (meshId);
- delete(array);
- }
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_GImpactCollisionShape.h b/engine/src/bullet/native/com_jme3_bullet_collision_shapes_GImpactCollisionShape.h
deleted file mode 100644
index f08d3ebf8..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_GImpactCollisionShape.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class com_jme3_bullet_collision_shapes_GImpactCollisionShape */
-
-#ifndef _Included_com_jme3_bullet_collision_shapes_GImpactCollisionShape
-#define _Included_com_jme3_bullet_collision_shapes_GImpactCollisionShape
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: com_jme3_bullet_collision_shapes_GImpactCollisionShape
- * Method: createShape
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_GImpactCollisionShape_createShape
- (JNIEnv *, jobject, jlong);
-
-/*
- * Class: com_jme3_bullet_collision_shapes_GImpactCollisionShape
- * Method: finalizeNative
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_shapes_GImpactCollisionShape_finalizeNative
- (JNIEnv *, jobject, jlong);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_HeightfieldCollisionShape.cpp b/engine/src/bullet/native/com_jme3_bullet_collision_shapes_HeightfieldCollisionShape.cpp
deleted file mode 100644
index 06698a1f0..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_HeightfieldCollisionShape.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2009-2010 jMonkeyEngine
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, 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.
- */
-
-/**
- * Author: Normen Hansen
- */
-#include "com_jme3_bullet_collision_shapes_HeightfieldCollisionShape.h"
-#include "jmeBulletUtil.h"
-#include "BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- /*
- * Class: com_jme3_bullet_collision_shapes_HeightfieldCollisionShape
- * Method: createShape
- * Signature: (II[FFFFIZ)J
- */
- JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_HeightfieldCollisionShape_createShape
- (JNIEnv * env, jobject object, jint heightStickWidth, jint heightStickLength, jobject heightfieldData, jfloat heightScale, jfloat minHeight, jfloat maxHeight, jint upAxis, jboolean flipQuadEdges) {
- jmeClasses::initJavaClasses(env);
- void* data = env->GetDirectBufferAddress(heightfieldData);
- btHeightfieldTerrainShape* shape=new btHeightfieldTerrainShape(heightStickWidth, heightStickLength, data, heightScale, minHeight, maxHeight, upAxis, PHY_FLOAT, flipQuadEdges);
- return reinterpret_cast(shape);
- }
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_HeightfieldCollisionShape.h b/engine/src/bullet/native/com_jme3_bullet_collision_shapes_HeightfieldCollisionShape.h
deleted file mode 100644
index a3d1621b8..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_HeightfieldCollisionShape.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class com_jme3_bullet_collision_shapes_HeightfieldCollisionShape */
-
-#ifndef _Included_com_jme3_bullet_collision_shapes_HeightfieldCollisionShape
-#define _Included_com_jme3_bullet_collision_shapes_HeightfieldCollisionShape
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: com_jme3_bullet_collision_shapes_HeightfieldCollisionShape
- * Method: createShape
- * Signature: (IILjava/nio/ByteBuffer;FFFIZ)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_HeightfieldCollisionShape_createShape
- (JNIEnv *, jobject, jint, jint, jobject, jfloat, jfloat, jfloat, jint, jboolean);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_HullCollisionShape.cpp b/engine/src/bullet/native/com_jme3_bullet_collision_shapes_HullCollisionShape.cpp
deleted file mode 100644
index 5789bd9ab..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_HullCollisionShape.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 2009-2010 jMonkeyEngine
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, 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.
- */
-
-/**
- * Author: Normen Hansen
- */
-#include "com_jme3_bullet_collision_shapes_HullCollisionShape.h"
-#include "jmeBulletUtil.h"
-#include "BulletCollision/CollisionShapes/btConvexHullShape.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- /*
- * Class: com_jme3_bullet_collision_shapes_HullCollisionShape
- * Method: createShape
- * Signature: ([F)J
- */
- JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_HullCollisionShape_createShape
- (JNIEnv *env, jobject object, jobject array) {
- jmeClasses::initJavaClasses(env);
- float* data = (float*) env->GetDirectBufferAddress(array);
- //TODO: capacity will not always be length!
- int length = env->GetDirectBufferCapacity(array)/4;
- btConvexHullShape* shape = new btConvexHullShape();
- for (int i = 0; i < length; i+=3) {
- btVector3 vect = btVector3(data[i],
- data[i + 1],
- data[i + 2]);
-
- shape->addPoint(vect);
- }
-
- return reinterpret_cast(shape);
- }
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_HullCollisionShape.h b/engine/src/bullet/native/com_jme3_bullet_collision_shapes_HullCollisionShape.h
deleted file mode 100644
index 42a267216..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_HullCollisionShape.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class com_jme3_bullet_collision_shapes_HullCollisionShape */
-
-#ifndef _Included_com_jme3_bullet_collision_shapes_HullCollisionShape
-#define _Included_com_jme3_bullet_collision_shapes_HullCollisionShape
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: com_jme3_bullet_collision_shapes_HullCollisionShape
- * Method: createShape
- * Signature: (Ljava/nio/ByteBuffer;)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_HullCollisionShape_createShape
- (JNIEnv *, jobject, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_MeshCollisionShape.cpp b/engine/src/bullet/native/com_jme3_bullet_collision_shapes_MeshCollisionShape.cpp
deleted file mode 100644
index 346d47ef9..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_MeshCollisionShape.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2009-2010 jMonkeyEngine
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, 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.
- */
-
-/**
- * Author: Normen Hansen
- */
-#include "com_jme3_bullet_collision_shapes_MeshCollisionShape.h"
-#include "jmeBulletUtil.h"
-#include "BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- /*
- * Class: com_jme3_bullet_collision_shapes_MeshCollisionShape
- * Method: createShape
- * Signature: (J)J
- */
- JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_MeshCollisionShape_createShape
- (JNIEnv * env, jobject object, jlong arrayId) {
- jmeClasses::initJavaClasses(env);
- btTriangleIndexVertexArray* array = reinterpret_cast(arrayId);
- btBvhTriangleMeshShape* shape = new btBvhTriangleMeshShape(array, true, true);
- return reinterpret_cast(shape);
- }
-
- /*
- * Class: com_jme3_bullet_collision_shapes_MeshCollisionShape
- * Method: finalizeNative
- * Signature: (J)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_shapes_MeshCollisionShape_finalizeNative
- (JNIEnv * env, jobject object, jlong arrayId){
- btTriangleIndexVertexArray* array = reinterpret_cast(arrayId);
- delete(array);
- }
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_MeshCollisionShape.h b/engine/src/bullet/native/com_jme3_bullet_collision_shapes_MeshCollisionShape.h
deleted file mode 100644
index 4dd6aa28a..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_MeshCollisionShape.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class com_jme3_bullet_collision_shapes_MeshCollisionShape */
-
-#ifndef _Included_com_jme3_bullet_collision_shapes_MeshCollisionShape
-#define _Included_com_jme3_bullet_collision_shapes_MeshCollisionShape
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: com_jme3_bullet_collision_shapes_MeshCollisionShape
- * Method: createShape
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_MeshCollisionShape_createShape
- (JNIEnv *, jobject, jlong);
-
-/*
- * Class: com_jme3_bullet_collision_shapes_MeshCollisionShape
- * Method: finalizeNative
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_shapes_MeshCollisionShape_finalizeNative
- (JNIEnv *, jobject, jlong);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_PlaneCollisionShape.cpp b/engine/src/bullet/native/com_jme3_bullet_collision_shapes_PlaneCollisionShape.cpp
deleted file mode 100644
index b8c9adc2d..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_PlaneCollisionShape.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2009-2010 jMonkeyEngine
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, 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.
- */
-
-/**
- * Author: Normen Hansen
- */
-#include "com_jme3_bullet_collision_shapes_PlaneCollisionShape.h"
-#include "jmeBulletUtil.h"
-#include "BulletCollision/CollisionShapes/btStaticPlaneShape.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- /*
- * Class: com_jme3_bullet_collision_shapes_PlaneCollisionShape
- * Method: createShape
- * Signature: (Lcom/jme3/math/Vector3f;F)J
- */
- JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_PlaneCollisionShape_createShape
- (JNIEnv * env, jobject object, jobject normal, jfloat constant) {
- jmeClasses::initJavaClasses(env);
- btVector3 norm = btVector3();
- jmeBulletUtil::convert(env, normal, &norm);
- btStaticPlaneShape* shape = new btStaticPlaneShape(norm, constant);
- return reinterpret_cast(shape);
- }
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_PlaneCollisionShape.h b/engine/src/bullet/native/com_jme3_bullet_collision_shapes_PlaneCollisionShape.h
deleted file mode 100644
index 7e7a22bdf..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_PlaneCollisionShape.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class com_jme3_bullet_collision_shapes_PlaneCollisionShape */
-
-#ifndef _Included_com_jme3_bullet_collision_shapes_PlaneCollisionShape
-#define _Included_com_jme3_bullet_collision_shapes_PlaneCollisionShape
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: com_jme3_bullet_collision_shapes_PlaneCollisionShape
- * Method: createShape
- * Signature: (Lcom/jme3/math/Vector3f;F)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_PlaneCollisionShape_createShape
- (JNIEnv *, jobject, jobject, jfloat);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_SimplexCollisionShape.cpp b/engine/src/bullet/native/com_jme3_bullet_collision_shapes_SimplexCollisionShape.cpp
deleted file mode 100644
index 733794538..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_SimplexCollisionShape.cpp
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (c) 2009-2010 jMonkeyEngine
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, 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.
- */
-
-/**
- * Author: Normen Hansen
- */
-#include "com_jme3_bullet_collision_shapes_SimplexCollisionShape.h"
-#include "jmeBulletUtil.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- /*
- * Class: com_jme3_bullet_collision_shapes_SimplexCollisionShape
- * Method: createShape
- * Signature: (Lcom/jme3/math/Vector3f;)J
- */
- JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_SimplexCollisionShape_createShape__Lcom_jme3_math_Vector3f_2
- (JNIEnv *env, jobject object, jobject vector1) {
- jmeClasses::initJavaClasses(env);
- btVector3 vec1 = btVector3();
- jmeBulletUtil::convert(env, vector1, &vec1);
- btBU_Simplex1to4* simplexShape = new btBU_Simplex1to4(vec1);
- return reinterpret_cast(simplexShape);
- }
-
- /*
- * Class: com_jme3_bullet_collision_shapes_SimplexCollisionShape
- * Method: createShape
- * Signature: (Lcom/jme3/math/Vector3f;Lcom/jme3/math/Vector3f;)J
- */
- JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_SimplexCollisionShape_createShape__Lcom_jme3_math_Vector3f_2Lcom_jme3_math_Vector3f_2
- (JNIEnv *env, jobject object, jobject vector1, jobject vector2) {
- jmeClasses::initJavaClasses(env);
- btVector3 vec1 = btVector3();
- jmeBulletUtil::convert(env, vector1, &vec1);
- btVector3 vec2 = btVector3();
- jmeBulletUtil::convert(env, vector2, &vec2);
- btBU_Simplex1to4* simplexShape = new btBU_Simplex1to4(vec1, vec2);
- return reinterpret_cast(simplexShape);
- }
- /*
- * Class: com_jme3_bullet_collision_shapes_SimplexCollisionShape
- * Method: createShape
- * Signature: (Lcom/jme3/math/Vector3f;Lcom/jme3/math/Vector3f;Lcom/jme3/math/Vector3f;)J
- */
- JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_SimplexCollisionShape_createShape__Lcom_jme3_math_Vector3f_2Lcom_jme3_math_Vector3f_2Lcom_jme3_math_Vector3f_2
- (JNIEnv * env, jobject object, jobject vector1, jobject vector2, jobject vector3) {
- jmeClasses::initJavaClasses(env);
- btVector3 vec1 = btVector3();
- jmeBulletUtil::convert(env, vector1, &vec1);
- btVector3 vec2 = btVector3();
- jmeBulletUtil::convert(env, vector2, &vec2);
- btVector3 vec3 = btVector3();
- jmeBulletUtil::convert(env, vector3, &vec3);
- btBU_Simplex1to4* simplexShape = new btBU_Simplex1to4(vec1, vec2, vec3);
- return reinterpret_cast(simplexShape);
- }
- /*
- * Class: com_jme3_bullet_collision_shapes_SimplexCollisionShape
- * Method: createShape
- * Signature: (Lcom/jme3/math/Vector3f;Lcom/jme3/math/Vector3f;Lcom/jme3/math/Vector3f;Lcom/jme3/math/Vector3f;)J
- */
- JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_SimplexCollisionShape_createShape__Lcom_jme3_math_Vector3f_2Lcom_jme3_math_Vector3f_2Lcom_jme3_math_Vector3f_2Lcom_jme3_math_Vector3f_2
- (JNIEnv * env, jobject object, jobject vector1, jobject vector2, jobject vector3, jobject vector4) {
- jmeClasses::initJavaClasses(env);
- btVector3 vec1 = btVector3();
- jmeBulletUtil::convert(env, vector1, &vec1);
- btVector3 vec2 = btVector3();
- jmeBulletUtil::convert(env, vector2, &vec2);
- btVector3 vec3 = btVector3();
- jmeBulletUtil::convert(env, vector3, &vec3);
- btVector3 vec4 = btVector3();
- jmeBulletUtil::convert(env, vector4, &vec4);
- btBU_Simplex1to4* simplexShape = new btBU_Simplex1to4(vec1, vec2, vec3, vec4);
- return reinterpret_cast(simplexShape);
- }
-#ifdef __cplusplus
-}
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_SimplexCollisionShape.h b/engine/src/bullet/native/com_jme3_bullet_collision_shapes_SimplexCollisionShape.h
deleted file mode 100644
index e50d06226..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_SimplexCollisionShape.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class com_jme3_bullet_collision_shapes_SimplexCollisionShape */
-
-#ifndef _Included_com_jme3_bullet_collision_shapes_SimplexCollisionShape
-#define _Included_com_jme3_bullet_collision_shapes_SimplexCollisionShape
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: com_jme3_bullet_collision_shapes_SimplexCollisionShape
- * Method: createShape
- * Signature: (Lcom/jme3/math/Vector3f;)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_SimplexCollisionShape_createShape__Lcom_jme3_math_Vector3f_2
- (JNIEnv *, jobject, jobject);
-
-/*
- * Class: com_jme3_bullet_collision_shapes_SimplexCollisionShape
- * Method: createShape
- * Signature: (Lcom/jme3/math/Vector3f;Lcom/jme3/math/Vector3f;)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_SimplexCollisionShape_createShape__Lcom_jme3_math_Vector3f_2Lcom_jme3_math_Vector3f_2
- (JNIEnv *, jobject, jobject, jobject);
-
-/*
- * Class: com_jme3_bullet_collision_shapes_SimplexCollisionShape
- * Method: createShape
- * Signature: (Lcom/jme3/math/Vector3f;Lcom/jme3/math/Vector3f;Lcom/jme3/math/Vector3f;)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_SimplexCollisionShape_createShape__Lcom_jme3_math_Vector3f_2Lcom_jme3_math_Vector3f_2Lcom_jme3_math_Vector3f_2
- (JNIEnv *, jobject, jobject, jobject, jobject);
-
-/*
- * Class: com_jme3_bullet_collision_shapes_SimplexCollisionShape
- * Method: createShape
- * Signature: (Lcom/jme3/math/Vector3f;Lcom/jme3/math/Vector3f;Lcom/jme3/math/Vector3f;Lcom/jme3/math/Vector3f;)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_SimplexCollisionShape_createShape__Lcom_jme3_math_Vector3f_2Lcom_jme3_math_Vector3f_2Lcom_jme3_math_Vector3f_2Lcom_jme3_math_Vector3f_2
- (JNIEnv *, jobject, jobject, jobject, jobject, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_SphereCollisionShape.cpp b/engine/src/bullet/native/com_jme3_bullet_collision_shapes_SphereCollisionShape.cpp
deleted file mode 100644
index 8f4b9840f..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_SphereCollisionShape.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2009-2010 jMonkeyEngine
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, 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.
- */
-
-/**
- * Author: Normen Hansen
- */
-#include "com_jme3_bullet_collision_shapes_SphereCollisionShape.h"
-#include "jmeBulletUtil.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- /*
- * Class: com_jme3_bullet_collision_shapes_SphereCollisionShape
- * Method: createShape
- * Signature: (F)J
- */
- JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_SphereCollisionShape_createShape
- (JNIEnv *env, jobject object, jfloat radius) {
- jmeClasses::initJavaClasses(env);
- btSphereShape* shape=new btSphereShape(radius);
- return reinterpret_cast(shape);
- }
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_SphereCollisionShape.h b/engine/src/bullet/native/com_jme3_bullet_collision_shapes_SphereCollisionShape.h
deleted file mode 100644
index ef1b2cbed..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_collision_shapes_SphereCollisionShape.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class com_jme3_bullet_collision_shapes_SphereCollisionShape */
-
-#ifndef _Included_com_jme3_bullet_collision_shapes_SphereCollisionShape
-#define _Included_com_jme3_bullet_collision_shapes_SphereCollisionShape
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: com_jme3_bullet_collision_shapes_SphereCollisionShape
- * Method: createShape
- * Signature: (F)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_SphereCollisionShape_createShape
- (JNIEnv *, jobject, jfloat);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_joints_ConeJoint.cpp b/engine/src/bullet/native/com_jme3_bullet_joints_ConeJoint.cpp
deleted file mode 100644
index cade120fa..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_joints_ConeJoint.cpp
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (c) 2009-2010 jMonkeyEngine
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, 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.
- */
-
-/**
- * Author: Normen Hansen
- */
-#include "com_jme3_bullet_joints_ConeJoint.h"
-#include "jmeBulletUtil.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- /*
- * Class: com_jme3_bullet_joints_ConeJoint
- * Method: setLimit
- * Signature: (JFFF)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_ConeJoint_setLimit
- (JNIEnv * env, jobject object, jlong jointId, jfloat swingSpan1, jfloat swingSpan2, jfloat twistSpan) {
- btConeTwistConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- //TODO: extended setLimit!
- joint->setLimit(swingSpan1, swingSpan2, twistSpan);
- }
-
- /*
- * Class: com_jme3_bullet_joints_ConeJoint
- * Method: setAngularOnly
- * Signature: (JZ)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_ConeJoint_setAngularOnly
- (JNIEnv * env, jobject object, jlong jointId, jboolean angularOnly) {
- btConeTwistConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- joint->setAngularOnly(angularOnly);
- }
-
- /*
- * Class: com_jme3_bullet_joints_ConeJoint
- * Method: createJoint
- * Signature: (JJLcom/jme3/math/Vector3f;Lcom/jme3/math/Matrix3f;Lcom/jme3/math/Vector3f;Lcom/jme3/math/Matrix3f;)J
- */
- JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_ConeJoint_createJoint
- (JNIEnv * env, jobject object, jlong bodyIdA, jlong bodyIdB, jobject pivotA, jobject rotA, jobject pivotB, jobject rotB) {
- jmeClasses::initJavaClasses(env);
- btRigidBody* bodyA = reinterpret_cast(bodyIdA);
- btRigidBody* bodyB = reinterpret_cast(bodyIdB);
- btMatrix3x3 mtx1 = btMatrix3x3();
- btMatrix3x3 mtx2 = btMatrix3x3();
- btTransform transA = btTransform(mtx1);
- jmeBulletUtil::convert(env, pivotA, &transA.getOrigin());
- jmeBulletUtil::convert(env, rotA, &transA.getBasis());
- btTransform transB = btTransform(mtx2);
- jmeBulletUtil::convert(env, pivotB, &transB.getOrigin());
- jmeBulletUtil::convert(env, rotB, &transB.getBasis());
- btConeTwistConstraint* joint = new btConeTwistConstraint(*bodyA, *bodyB, transA, transB);
- return reinterpret_cast(joint);
- }
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_joints_ConeJoint.h b/engine/src/bullet/native/com_jme3_bullet_joints_ConeJoint.h
deleted file mode 100644
index 327b47f25..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_joints_ConeJoint.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class com_jme3_bullet_joints_ConeJoint */
-
-#ifndef _Included_com_jme3_bullet_joints_ConeJoint
-#define _Included_com_jme3_bullet_joints_ConeJoint
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: com_jme3_bullet_joints_ConeJoint
- * Method: setLimit
- * Signature: (JFFF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_ConeJoint_setLimit
- (JNIEnv *, jobject, jlong, jfloat, jfloat, jfloat);
-
-/*
- * Class: com_jme3_bullet_joints_ConeJoint
- * Method: setAngularOnly
- * Signature: (JZ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_ConeJoint_setAngularOnly
- (JNIEnv *, jobject, jlong, jboolean);
-
-/*
- * Class: com_jme3_bullet_joints_ConeJoint
- * Method: createJoint
- * Signature: (JJLcom/jme3/math/Vector3f;Lcom/jme3/math/Matrix3f;Lcom/jme3/math/Vector3f;Lcom/jme3/math/Matrix3f;)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_ConeJoint_createJoint
- (JNIEnv *, jobject, jlong, jlong, jobject, jobject, jobject, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_joints_HingeJoint.cpp b/engine/src/bullet/native/com_jme3_bullet_joints_HingeJoint.cpp
deleted file mode 100644
index 56a6fecde..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_joints_HingeJoint.cpp
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
- * Copyright (c) 2009-2010 jMonkeyEngine
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, 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.
- */
-
-/**
- * Author: Normen Hansen
- */
-#include "com_jme3_bullet_joints_HingeJoint.h"
-#include "jmeBulletUtil.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- /*
- * Class: com_jme3_bullet_joints_HingeJoint
- * Method: enableMotor
- * Signature: (JZFF)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_HingeJoint_enableMotor
- (JNIEnv * env, jobject object, jlong jointId, jboolean enable, jfloat targetVelocity, jfloat maxMotorImpulse) {
- btHingeConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- joint->enableAngularMotor(enable, targetVelocity, maxMotorImpulse);
- }
-
- /*
- * Class: com_jme3_bullet_joints_HingeJoint
- * Method: getEnableAngularMotor
- * Signature: (J)Z
- */
- JNIEXPORT jboolean JNICALL Java_com_jme3_bullet_joints_HingeJoint_getEnableAngularMotor
- (JNIEnv * env, jobject object, jlong jointId) {
- btHingeConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return false;
- }
- return joint->getEnableAngularMotor();
- }
-
- /*
- * Class: com_jme3_bullet_joints_HingeJoint
- * Method: getMotorTargetVelocity
- * Signature: (J)F
- */
- JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_HingeJoint_getMotorTargetVelocity
- (JNIEnv * env, jobject object, jlong jointId) {
- btHingeConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- return joint->getMotorTargetVelosity();
- }
-
- /*
- * Class: com_jme3_bullet_joints_HingeJoint
- * Method: getMaxMotorImpulse
- * Signature: (J)F
- */
- JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_HingeJoint_getMaxMotorImpulse
- (JNIEnv * env, jobject object, jlong jointId) {
- btHingeConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- return joint->getMaxMotorImpulse();
- }
-
- /*
- * Class: com_jme3_bullet_joints_HingeJoint
- * Method: setLimit
- * Signature: (JFF)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_HingeJoint_setLimit__JFF
- (JNIEnv * env, jobject object, jlong jointId, jfloat low, jfloat high) {
- btHingeConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- return joint->setLimit(low, high);
- }
-
- /*
- * Class: com_jme3_bullet_joints_HingeJoint
- * Method: setLimit
- * Signature: (JFFFFF)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_HingeJoint_setLimit__JFFFFF
- (JNIEnv * env, jobject object, jlong jointId, jfloat low, jfloat high, jfloat softness, jfloat biasFactor, jfloat relaxationFactor) {
- btHingeConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- return joint->setLimit(low, high, softness, biasFactor, relaxationFactor);
- }
-
- /*
- * Class: com_jme3_bullet_joints_HingeJoint
- * Method: getUpperLimit
- * Signature: (J)F
- */
- JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_HingeJoint_getUpperLimit
- (JNIEnv * env, jobject object, jlong jointId) {
- btHingeConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- return joint->getUpperLimit();
- }
-
- /*
- * Class: com_jme3_bullet_joints_HingeJoint
- * Method: getLowerLimit
- * Signature: (J)F
- */
- JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_HingeJoint_getLowerLimit
- (JNIEnv * env, jobject object, jlong jointId) {
- btHingeConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- return joint->getLowerLimit();
- }
-
- /*
- * Class: com_jme3_bullet_joints_HingeJoint
- * Method: setAngularOnly
- * Signature: (JZ)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_HingeJoint_setAngularOnly
- (JNIEnv * env, jobject object, jlong jointId, jboolean angular) {
- btHingeConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- joint->setAngularOnly(angular);
- }
-
- /*
- * Class: com_jme3_bullet_joints_HingeJoint
- * Method: getHingeAngle
- * Signature: (J)F
- */
- JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_HingeJoint_getHingeAngle
- (JNIEnv * env, jobject object, jlong jointId) {
- btHingeConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- return joint->getHingeAngle();
- }
-
- /*
- * Class: com_jme3_bullet_joints_HingeJoint
- * Method: createJoint
- * Signature: (JJLcom/jme3/math/Vector3f;Lcom/jme3/math/Vector3f;Lcom/jme3/math/Vector3f;Lcom/jme3/math/Vector3f;)J
- */
- JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_HingeJoint_createJoint
- (JNIEnv * env, jobject object, jlong bodyIdA, jlong bodyIdB, jobject pivotA, jobject axisA, jobject pivotB, jobject axisB) {
- jmeClasses::initJavaClasses(env);
- btRigidBody* bodyA = reinterpret_cast(bodyIdA);
- btRigidBody* bodyB = reinterpret_cast(bodyIdB);
- btVector3 vec1 = btVector3();
- btVector3 vec2 = btVector3();
- btVector3 vec3 = btVector3();
- btVector3 vec4 = btVector3();
- jmeBulletUtil::convert(env, pivotA, &vec1);
- jmeBulletUtil::convert(env, pivotB, &vec2);
- jmeBulletUtil::convert(env, axisA, &vec3);
- jmeBulletUtil::convert(env, axisB, &vec4);
- btHingeConstraint* joint = new btHingeConstraint(*bodyA, *bodyB, vec1, vec2, vec3, vec4);
- return reinterpret_cast(joint);
- }
-#ifdef __cplusplus
-}
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_joints_HingeJoint.h b/engine/src/bullet/native/com_jme3_bullet_joints_HingeJoint.h
deleted file mode 100644
index ab6e0034f..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_joints_HingeJoint.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class com_jme3_bullet_joints_HingeJoint */
-
-#ifndef _Included_com_jme3_bullet_joints_HingeJoint
-#define _Included_com_jme3_bullet_joints_HingeJoint
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: com_jme3_bullet_joints_HingeJoint
- * Method: enableMotor
- * Signature: (JZFF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_HingeJoint_enableMotor
- (JNIEnv *, jobject, jlong, jboolean, jfloat, jfloat);
-
-/*
- * Class: com_jme3_bullet_joints_HingeJoint
- * Method: getEnableAngularMotor
- * Signature: (J)Z
- */
-JNIEXPORT jboolean JNICALL Java_com_jme3_bullet_joints_HingeJoint_getEnableAngularMotor
- (JNIEnv *, jobject, jlong);
-
-/*
- * Class: com_jme3_bullet_joints_HingeJoint
- * Method: getMotorTargetVelocity
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_HingeJoint_getMotorTargetVelocity
- (JNIEnv *, jobject, jlong);
-
-/*
- * Class: com_jme3_bullet_joints_HingeJoint
- * Method: getMaxMotorImpulse
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_HingeJoint_getMaxMotorImpulse
- (JNIEnv *, jobject, jlong);
-
-/*
- * Class: com_jme3_bullet_joints_HingeJoint
- * Method: setLimit
- * Signature: (JFF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_HingeJoint_setLimit__JFF
- (JNIEnv *, jobject, jlong, jfloat, jfloat);
-
-/*
- * Class: com_jme3_bullet_joints_HingeJoint
- * Method: setLimit
- * Signature: (JFFFFF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_HingeJoint_setLimit__JFFFFF
- (JNIEnv *, jobject, jlong, jfloat, jfloat, jfloat, jfloat, jfloat);
-
-/*
- * Class: com_jme3_bullet_joints_HingeJoint
- * Method: getUpperLimit
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_HingeJoint_getUpperLimit
- (JNIEnv *, jobject, jlong);
-
-/*
- * Class: com_jme3_bullet_joints_HingeJoint
- * Method: getLowerLimit
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_HingeJoint_getLowerLimit
- (JNIEnv *, jobject, jlong);
-
-/*
- * Class: com_jme3_bullet_joints_HingeJoint
- * Method: setAngularOnly
- * Signature: (JZ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_HingeJoint_setAngularOnly
- (JNIEnv *, jobject, jlong, jboolean);
-
-/*
- * Class: com_jme3_bullet_joints_HingeJoint
- * Method: getHingeAngle
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_HingeJoint_getHingeAngle
- (JNIEnv *, jobject, jlong);
-
-/*
- * Class: com_jme3_bullet_joints_HingeJoint
- * Method: createJoint
- * Signature: (JJLcom/jme3/math/Vector3f;Lcom/jme3/math/Vector3f;Lcom/jme3/math/Vector3f;Lcom/jme3/math/Vector3f;)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_HingeJoint_createJoint
- (JNIEnv *, jobject, jlong, jlong, jobject, jobject, jobject, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_joints_PhysicsJoint.cpp b/engine/src/bullet/native/com_jme3_bullet_joints_PhysicsJoint.cpp
deleted file mode 100644
index c5ae9c1b1..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_joints_PhysicsJoint.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2009-2010 jMonkeyEngine
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, 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.
- */
-
-/**
- * Author: Normen Hansen
- */
-#include "com_jme3_bullet_joints_PhysicsJoint.h"
-#include "jmeBulletUtil.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- /*
- * Class: com_jme3_bullet_joints_PhysicsJoint
- * Method: getAppliedImpulse
- * Signature: (J)F
- */
- JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_PhysicsJoint_getAppliedImpulse
- (JNIEnv * env, jobject object, jlong jointId) {
- btTypedConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- return joint->getAppliedImpulse();
- }
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_joints_PhysicsJoint.h b/engine/src/bullet/native/com_jme3_bullet_joints_PhysicsJoint.h
deleted file mode 100644
index 63e21a7d3..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_joints_PhysicsJoint.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class com_jme3_bullet_joints_PhysicsJoint */
-
-#ifndef _Included_com_jme3_bullet_joints_PhysicsJoint
-#define _Included_com_jme3_bullet_joints_PhysicsJoint
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: com_jme3_bullet_joints_PhysicsJoint
- * Method: getAppliedImpulse
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_PhysicsJoint_getAppliedImpulse
- (JNIEnv *, jobject, jlong);
-
-/*
- * Class: com_jme3_bullet_joints_PhysicsJoint
- * Method: finalizeNative
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_PhysicsJoint_finalizeNative
- (JNIEnv *, jobject, jlong);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_joints_Point2PointJoint.cpp b/engine/src/bullet/native/com_jme3_bullet_joints_Point2PointJoint.cpp
deleted file mode 100644
index e019b9b23..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_joints_Point2PointJoint.cpp
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Copyright (c) 2009-2010 jMonkeyEngine
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, 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.
- */
-
-/**
- * Author: Normen Hansen
- */
-#include "com_jme3_bullet_joints_Point2PointJoint.h"
-#include "jmeBulletUtil.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- /*
- * Class: com_jme3_bullet_joints_Point2PointJoint
- * Method: setDamping
- * Signature: (JF)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_setDamping
- (JNIEnv * env, jobject object, jlong jointId, jfloat damping) {
- btPoint2PointConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- joint->m_setting.m_damping = damping;
- }
-
- /*
- * Class: com_jme3_bullet_joints_Point2PointJoint
- * Method: setImpulseClamp
- * Signature: (JF)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_setImpulseClamp
- (JNIEnv * env, jobject object, jlong jointId, jfloat clamp) {
- btPoint2PointConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- joint->m_setting.m_impulseClamp = clamp;
- }
-
- /*
- * Class: com_jme3_bullet_joints_Point2PointJoint
- * Method: setTau
- * Signature: (JF)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_setTau
- (JNIEnv * env, jobject object, jlong jointId, jfloat tau) {
- btPoint2PointConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- joint->m_setting.m_tau = tau;
- }
-
- /*
- * Class: com_jme3_bullet_joints_Point2PointJoint
- * Method: getDamping
- * Signature: (J)F
- */
- JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_getDamping
- (JNIEnv * env, jobject object, jlong jointId) {
- btPoint2PointConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- return joint->m_setting.m_damping;
- }
-
- /*
- * Class: com_jme3_bullet_joints_Point2PointJoint
- * Method: getImpulseClamp
- * Signature: (J)F
- */
- JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_getImpulseClamp
- (JNIEnv * env, jobject object, jlong jointId) {
- btPoint2PointConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- return joint->m_setting.m_damping;
- }
-
- /*
- * Class: com_jme3_bullet_joints_Point2PointJoint
- * Method: getTau
- * Signature: (J)F
- */
- JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_getTau
- (JNIEnv * env, jobject object, jlong jointId) {
- btPoint2PointConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- return joint->m_setting.m_damping;
- }
-
- /*
- * Class: com_jme3_bullet_joints_Point2PointJoint
- * Method: createJoint
- * Signature: (JJLcom/jme3/math/Vector3f;Lcom/jme3/math/Vector3f;)J
- */
- JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_createJoint
- (JNIEnv * env, jobject object, jlong bodyIdA, jlong bodyIdB, jobject pivotA, jobject pivotB) {
- jmeClasses::initJavaClasses(env);
- btRigidBody* bodyA = reinterpret_cast(bodyIdA);
- btRigidBody* bodyB = reinterpret_cast(bodyIdB);
- //TODO: matrix not needed?
- btMatrix3x3 mtx1 = btMatrix3x3();
- btMatrix3x3 mtx2 = btMatrix3x3();
- btTransform transA = btTransform(mtx1);
- jmeBulletUtil::convert(env, pivotA, &transA.getOrigin());
- btTransform transB = btTransform(mtx2);
- jmeBulletUtil::convert(env, pivotB, &transB.getOrigin());
- btHingeConstraint* joint = new btHingeConstraint(*bodyA, *bodyB, transA, transB);
- return reinterpret_cast(joint);
- }
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_joints_Point2PointJoint.h b/engine/src/bullet/native/com_jme3_bullet_joints_Point2PointJoint.h
deleted file mode 100644
index 5cb8188a8..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_joints_Point2PointJoint.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class com_jme3_bullet_joints_Point2PointJoint */
-
-#ifndef _Included_com_jme3_bullet_joints_Point2PointJoint
-#define _Included_com_jme3_bullet_joints_Point2PointJoint
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: com_jme3_bullet_joints_Point2PointJoint
- * Method: setDamping
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_setDamping
- (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class: com_jme3_bullet_joints_Point2PointJoint
- * Method: setImpulseClamp
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_setImpulseClamp
- (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class: com_jme3_bullet_joints_Point2PointJoint
- * Method: setTau
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_setTau
- (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class: com_jme3_bullet_joints_Point2PointJoint
- * Method: getDamping
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_getDamping
- (JNIEnv *, jobject, jlong);
-
-/*
- * Class: com_jme3_bullet_joints_Point2PointJoint
- * Method: getImpulseClamp
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_getImpulseClamp
- (JNIEnv *, jobject, jlong);
-
-/*
- * Class: com_jme3_bullet_joints_Point2PointJoint
- * Method: getTau
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_getTau
- (JNIEnv *, jobject, jlong);
-
-/*
- * Class: com_jme3_bullet_joints_Point2PointJoint
- * Method: createJoint
- * Signature: (JJLcom/jme3/math/Vector3f;Lcom/jme3/math/Vector3f;)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_createJoint
- (JNIEnv *, jobject, jlong, jlong, jobject, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_joints_SixDofJoint.cpp b/engine/src/bullet/native/com_jme3_bullet_joints_SixDofJoint.cpp
deleted file mode 100644
index 9611a1456..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_joints_SixDofJoint.cpp
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * Copyright (c) 2009-2010 jMonkeyEngine
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, 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.
- */
-
-/**
- * Author: Normen Hansen
- */
-#include "com_jme3_bullet_joints_SixDofJoint.h"
-#include "jmeBulletUtil.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- /*
- * Class: com_jme3_bullet_joints_SixDofJoint
- * Method: getRotationalLimitMotor
- * Signature: (JI)J
- */
- JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_SixDofJoint_getRotationalLimitMotor
- (JNIEnv * env, jobject object, jlong jointId, jint index) {
- btGeneric6DofConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- return reinterpret_cast(joint->getRotationalLimitMotor(index));
- }
-
- /*
- * Class: com_jme3_bullet_joints_SixDofJoint
- * Method: getTranslationalLimitMotor
- * Signature: (J)J
- */
- JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_SixDofJoint_getTranslationalLimitMotor
- (JNIEnv * env, jobject object, jlong jointId) {
- btGeneric6DofConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- return reinterpret_cast(joint->getTranslationalLimitMotor());
- }
-
- /*
- * Class: com_jme3_bullet_joints_SixDofJoint
- * Method: setLinearUpperLimit
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofJoint_setLinearUpperLimit
- (JNIEnv * env, jobject object, jlong jointId, jobject vector) {
- btGeneric6DofConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- btVector3 vec = btVector3();
- jmeBulletUtil::convert(env, vector, &vec);
- joint->setLinearUpperLimit(vec);
- }
-
- /*
- * Class: com_jme3_bullet_joints_SixDofJoint
- * Method: setLinearLowerLimit
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofJoint_setLinearLowerLimit
- (JNIEnv * env, jobject object, jlong jointId, jobject vector) {
- btGeneric6DofConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- btVector3 vec = btVector3();
- jmeBulletUtil::convert(env, vector, &vec);
- joint->setLinearLowerLimit(vec);
- }
-
- /*
- * Class: com_jme3_bullet_joints_SixDofJoint
- * Method: setAngularUpperLimit
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofJoint_setAngularUpperLimit
- (JNIEnv * env, jobject object, jlong jointId, jobject vector) {
- btGeneric6DofConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- btVector3 vec = btVector3();
- jmeBulletUtil::convert(env, vector, &vec);
- joint->setAngularUpperLimit(vec);
- }
-
- /*
- * Class: com_jme3_bullet_joints_SixDofJoint
- * Method: setAngularLowerLimit
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofJoint_setAngularLowerLimit
- (JNIEnv * env, jobject object, jlong jointId, jobject vector) {
- btGeneric6DofConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- btVector3 vec = btVector3();
- jmeBulletUtil::convert(env, vector, &vec);
- joint->setAngularLowerLimit(vec);
- }
-
- /*
- * Class: com_jme3_bullet_joints_SixDofJoint
- * Method: createJoint
- * Signature: (JJLcom/jme3/math/Vector3f;Lcom/jme3/math/Matrix3f;Lcom/jme3/math/Vector3f;Lcom/jme3/math/Matrix3f;Z)J
- */
- JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_SixDofJoint_createJoint
- (JNIEnv * env, jobject object, jlong bodyIdA, jlong bodyIdB, jobject pivotA, jobject rotA, jobject pivotB, jobject rotB, jboolean useLinearReferenceFrameA) {
- jmeClasses::initJavaClasses(env);
- btRigidBody* bodyA = reinterpret_cast(bodyIdA);
- btRigidBody* bodyB = reinterpret_cast(bodyIdB);
- btMatrix3x3 mtx1 = btMatrix3x3();
- btMatrix3x3 mtx2 = btMatrix3x3();
- btTransform transA = btTransform(mtx1);
- jmeBulletUtil::convert(env, pivotA, &transA.getOrigin());
- jmeBulletUtil::convert(env, rotA, &transA.getBasis());
- btTransform transB = btTransform(mtx2);
- jmeBulletUtil::convert(env, pivotB, &transB.getOrigin());
- jmeBulletUtil::convert(env, rotB, &transB.getBasis());
- btGeneric6DofConstraint* joint = new btGeneric6DofConstraint(*bodyA, *bodyB, transA, transB, useLinearReferenceFrameA);
- return reinterpret_cast(joint);
- }
-#ifdef __cplusplus
-}
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_joints_SixDofJoint.h b/engine/src/bullet/native/com_jme3_bullet_joints_SixDofJoint.h
deleted file mode 100644
index 86e610234..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_joints_SixDofJoint.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class com_jme3_bullet_joints_SixDofJoint */
-
-#ifndef _Included_com_jme3_bullet_joints_SixDofJoint
-#define _Included_com_jme3_bullet_joints_SixDofJoint
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: com_jme3_bullet_joints_SixDofJoint
- * Method: getRotationalLimitMotor
- * Signature: (JI)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_SixDofJoint_getRotationalLimitMotor
- (JNIEnv *, jobject, jlong, jint);
-
-/*
- * Class: com_jme3_bullet_joints_SixDofJoint
- * Method: getTranslationalLimitMotor
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_SixDofJoint_getTranslationalLimitMotor
- (JNIEnv *, jobject, jlong);
-
-/*
- * Class: com_jme3_bullet_joints_SixDofJoint
- * Method: setLinearUpperLimit
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofJoint_setLinearUpperLimit
- (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class: com_jme3_bullet_joints_SixDofJoint
- * Method: setLinearLowerLimit
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofJoint_setLinearLowerLimit
- (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class: com_jme3_bullet_joints_SixDofJoint
- * Method: setAngularUpperLimit
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofJoint_setAngularUpperLimit
- (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class: com_jme3_bullet_joints_SixDofJoint
- * Method: setAngularLowerLimit
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofJoint_setAngularLowerLimit
- (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class: com_jme3_bullet_joints_SixDofJoint
- * Method: createJoint
- * Signature: (JJLcom/jme3/math/Vector3f;Lcom/jme3/math/Matrix3f;Lcom/jme3/math/Vector3f;Lcom/jme3/math/Matrix3f;Z)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_SixDofJoint_createJoint
- (JNIEnv *, jobject, jlong, jlong, jobject, jobject, jobject, jobject, jboolean);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_joints_SixDofSpringJoint.cpp b/engine/src/bullet/native/com_jme3_bullet_joints_SixDofSpringJoint.cpp
deleted file mode 100644
index 97724c626..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_joints_SixDofSpringJoint.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-
-/**
- * Author: Normen Hansen
- */
-#include "com_jme3_bullet_joints_SixDofSpringJoint.h"
-#include "jmeBulletUtil.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Class: com_jme3_bullet_joints_SixDofSpringJoint
- * Method: enableString
- * Signature: (JIZ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofSpringJoint_enableSpring
- (JNIEnv *env, jobject object, jlong jointId, jint index, jboolean onOff) {
- btGeneric6DofSpringConstraint* joint = reinterpret_cast(jointId);
- joint -> enableSpring(index, onOff);
-}
-
-
-/*
- * Class: com_jme3_bullet_joints_SixDofSpringJoint
- * Method: setStiffness
- * Signature: (JIF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofSpringJoint_setStiffness
- (JNIEnv *env, jobject object, jlong jointId, jint index, jfloat stiffness) {
- btGeneric6DofSpringConstraint* joint = reinterpret_cast(jointId);
- joint -> setStiffness(index, stiffness);
-}
-
-/*
- * Class: com_jme3_bullet_joints_SixDofSpringJoint
- * Method: setDamping
- * Signature: (JIF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofSpringJoint_setDamping
- (JNIEnv *env, jobject object, jlong jointId, jint index, jfloat damping) {
- btGeneric6DofSpringConstraint* joint = reinterpret_cast(jointId);
- joint -> setDamping(index, damping);
-}
-
-/*
- * Class: com_jme3_bullet_joints_SixDofSpringJoint
- * Method: setEquilibriumPoint
- * Signature: (JIF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofSpringJoint_setEquilibriumPoint__J
- (JNIEnv *env, jobject object, jlong jointId) {
- btGeneric6DofSpringConstraint* joint = reinterpret_cast(jointId);
- joint -> setEquilibriumPoint();
-}
-
-/*
- * Class: com_jme3_bullet_joints_SixDofSpringJoint
- * Method: setEquilibriumPoint
- * Signature: (JI)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofSpringJoint_setEquilibriumPoint__JI
- (JNIEnv *env, jobject object, jlong jointId, jint index) {
- btGeneric6DofSpringConstraint* joint = reinterpret_cast(jointId);
- joint -> setEquilibriumPoint(index);
-}
-
-
-
-
-/*
- * Class: com_jme3_bullet_joints_SixDofSpringJoint
- * Method: createJoint
- * Signature: (JJLcom/jme3/math/Vector3f;Lcom/jme3/math/Matrix3f;Lcom/jme3/math/Vector3f;Lcom/jme3/math/Matrix3f;Z)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_SixDofSpringJoint_createJoint
- (JNIEnv * env, jobject object, jlong bodyIdA, jlong bodyIdB, jobject pivotA, jobject rotA, jobject pivotB, jobject rotB, jboolean useLinearReferenceFrameA) {
- jmeClasses::initJavaClasses(env);
- btRigidBody* bodyA = reinterpret_cast(bodyIdA);
- btRigidBody* bodyB = reinterpret_cast(bodyIdB);
- btTransform transA;
- jmeBulletUtil::convert(env, pivotA, &transA.getOrigin());
- jmeBulletUtil::convert(env, rotA, &transA.getBasis());
- btTransform transB;
- jmeBulletUtil::convert(env, pivotB, &transB.getOrigin());
- jmeBulletUtil::convert(env, rotB, &transB.getBasis());
-
- btGeneric6DofSpringConstraint* joint = new btGeneric6DofSpringConstraint(*bodyA, *bodyB, transA, transB, useLinearReferenceFrameA);
- return reinterpret_cast(joint);
- }
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_joints_SixDofSpringJoint.h b/engine/src/bullet/native/com_jme3_bullet_joints_SixDofSpringJoint.h
deleted file mode 100644
index b4fced0c9..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_joints_SixDofSpringJoint.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class com_jme3_bullet_joints_SixDofSpringJoint */
-
-#ifndef _Included_com_jme3_bullet_joints_SixDofSpringJoint
-#define _Included_com_jme3_bullet_joints_SixDofSpringJoint
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: com_jme3_bullet_joints_SixDofSpringJoint
- * Method: enableSpring
- * Signature: (JIZ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofSpringJoint_enableSpring
- (JNIEnv *, jobject, jlong, jint, jboolean);
-
-/*
- * Class: com_jme3_bullet_joints_SixDofSpringJoint
- * Method: setStiffness
- * Signature: (JIF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofSpringJoint_setStiffness
- (JNIEnv *, jobject, jlong, jint, jfloat);
-
-/*
- * Class: com_jme3_bullet_joints_SixDofSpringJoint
- * Method: setDamping
- * Signature: (JIF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofSpringJoint_setDamping
- (JNIEnv *, jobject, jlong, jint, jfloat);
-
-/*
- * Class: com_jme3_bullet_joints_SixDofSpringJoint
- * Method: setEquilibriumPoint
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofSpringJoint_setEquilibriumPoint__J
- (JNIEnv *, jobject, jlong);
-
-/*
- * Class: com_jme3_bullet_joints_SixDofSpringJoint
- * Method: setEquilibriumPoint
- * Signature: (JI)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofSpringJoint_setEquilibriumPoint__JI
- (JNIEnv *, jobject, jlong, jint);
-
-/*
- * Class: com_jme3_bullet_joints_SixDofSpringJoint
- * Method: createJoint
- * Signature: (JJLcom/jme3/math/Vector3f;Lcom/jme3/math/Matrix3f;Lcom/jme3/math/Vector3f;Lcom/jme3/math/Matrix3f;Z)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_SixDofSpringJoint_createJoint
- (JNIEnv *, jobject, jlong, jlong, jobject, jobject, jobject, jobject, jboolean);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/engine/src/bullet/native/com_jme3_bullet_joints_SliderJoint.cpp b/engine/src/bullet/native/com_jme3_bullet_joints_SliderJoint.cpp
deleted file mode 100644
index c6e704d56..000000000
--- a/engine/src/bullet/native/com_jme3_bullet_joints_SliderJoint.cpp
+++ /dev/null
@@ -1,963 +0,0 @@
-/*
- * Copyright (c) 2009-2010 jMonkeyEngine
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, 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.
- */
-
-/**
- * Author: Normen Hansen
- */
-#include "com_jme3_bullet_joints_SliderJoint.h"
-#include "jmeBulletUtil.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: getLowerLinLimit
- * Signature: (J)F
- */
- JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getLowerLinLimit
- (JNIEnv * env, jobject object, jlong jointId) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- return joint->getLowerLinLimit();
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: setLowerLinLimit
- * Signature: (JF)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setLowerLinLimit
- (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- joint->setLowerLinLimit(value);
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: getUpperLinLimit
- * Signature: (J)F
- */
- JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getUpperLinLimit
- (JNIEnv * env, jobject object, jlong jointId) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- return joint->getUpperLinLimit();
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: setUpperLinLimit
- * Signature: (JF)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setUpperLinLimit
- (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- joint->setUpperLinLimit(value);
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: getLowerAngLimit
- * Signature: (J)F
- */
- JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getLowerAngLimit
- (JNIEnv * env, jobject object, jlong jointId) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- return joint->getLowerAngLimit();
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: setLowerAngLimit
- * Signature: (JF)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setLowerAngLimit
- (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- joint->setLowerAngLimit(value);
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: getUpperAngLimit
- * Signature: (J)F
- */
- JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getUpperAngLimit
- (JNIEnv * env, jobject object, jlong jointId) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- return joint->getUpperAngLimit();
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: setUpperAngLimit
- * Signature: (JF)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setUpperAngLimit
- (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- joint->setUpperAngLimit(value);
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: getSoftnessDirLin
- * Signature: (J)F
- */
- JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getSoftnessDirLin
- (JNIEnv * env, jobject object, jlong jointId) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- return joint->getSoftnessDirLin();
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: setSoftnessDirLin
- * Signature: (JF)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setSoftnessDirLin
- (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- joint->setSoftnessDirLin(value);
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: getRestitutionDirLin
- * Signature: (J)F
- */
- JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getRestitutionDirLin
- (JNIEnv * env, jobject object, jlong jointId) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- return joint->getRestitutionDirLin();
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: setRestitutionDirLin
- * Signature: (JF)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setRestitutionDirLin
- (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- joint->setRestitutionDirLin(value);
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: getDampingDirLin
- * Signature: (J)F
- */
- JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getDampingDirLin
- (JNIEnv * env, jobject object, jlong jointId) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- return joint->getDampingDirLin();
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: setDampingDirLin
- * Signature: (JF)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setDampingDirLin
- (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- joint->setDampingDirLin(value);
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: getSoftnessDirAng
- * Signature: (J)F
- */
- JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getSoftnessDirAng
- (JNIEnv * env, jobject object, jlong jointId) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- return joint->getSoftnessDirAng();
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: setSoftnessDirAng
- * Signature: (JF)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setSoftnessDirAng
- (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- joint->setSoftnessDirAng(value);
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: getRestitutionDirAng
- * Signature: (J)F
- */
- JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getRestitutionDirAng
- (JNIEnv * env, jobject object, jlong jointId) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- return joint->getRestitutionDirAng();
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: setRestitutionDirAng
- * Signature: (JF)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setRestitutionDirAng
- (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- joint->setRestitutionDirAng(value);
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: getDampingDirAng
- * Signature: (J)F
- */
- JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getDampingDirAng
- (JNIEnv * env, jobject object, jlong jointId) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- return joint->getDampingDirAng();
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: setDampingDirAng
- * Signature: (JF)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setDampingDirAng
- (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- joint->setDampingDirAng(value);
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: getSoftnessLimLin
- * Signature: (J)F
- */
- JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getSoftnessLimLin
- (JNIEnv * env, jobject object, jlong jointId) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- return joint->getSoftnessLimLin();
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: setSoftnessLimLin
- * Signature: (JF)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setSoftnessLimLin
- (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- joint->setSoftnessLimLin(value);
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: getRestitutionLimLin
- * Signature: (J)F
- */
- JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getRestitutionLimLin
- (JNIEnv * env, jobject object, jlong jointId) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- return joint->getRestitutionLimLin();
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: setRestitutionLimLin
- * Signature: (JF)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setRestitutionLimLin
- (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- joint->setRestitutionLimLin(value);
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: getDampingLimLin
- * Signature: (J)F
- */
- JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getDampingLimLin
- (JNIEnv * env, jobject object, jlong jointId) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- return joint->getDampingLimLin();
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: setDampingLimLin
- * Signature: (JF)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setDampingLimLin
- (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- joint->setDampingLimLin(value);
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: getSoftnessLimAng
- * Signature: (J)F
- */
- JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getSoftnessLimAng
- (JNIEnv * env, jobject object, jlong jointId) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- return joint->getSoftnessLimAng();
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: setSoftnessLimAng
- * Signature: (JF)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setSoftnessLimAng
- (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- joint->setSoftnessLimAng(value);
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: getRestitutionLimAng
- * Signature: (J)F
- */
- JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getRestitutionLimAng
- (JNIEnv * env, jobject object, jlong jointId) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- return joint->getRestitutionLimAng();
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: setRestitutionLimAng
- * Signature: (JF)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setRestitutionLimAng
- (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- joint->setRestitutionLimAng(value);
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: getDampingLimAng
- * Signature: (J)F
- */
- JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getDampingLimAng
- (JNIEnv * env, jobject object, jlong jointId) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- return joint->getDampingLimAng();
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: setDampingLimAng
- * Signature: (JF)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setDampingLimAng
- (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- joint->setDampingLimAng(value);
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: getSoftnessOrthoLin
- * Signature: (J)F
- */
- JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getSoftnessOrthoLin
- (JNIEnv * env, jobject object, jlong jointId) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- return joint->getSoftnessOrthoLin();
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: setSoftnessOrthoLin
- * Signature: (JF)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setSoftnessOrthoLin
- (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- joint->setSoftnessOrthoLin(value);
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: getRestitutionOrthoLin
- * Signature: (J)F
- */
- JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getRestitutionOrthoLin
- (JNIEnv * env, jobject object, jlong jointId) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- return joint->getRestitutionOrthoLin();
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: setRestitutionOrthoLin
- * Signature: (JF)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setRestitutionOrthoLin
- (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- joint->setRestitutionOrthoLin(value);
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: getDampingOrthoLin
- * Signature: (J)F
- */
- JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getDampingOrthoLin
- (JNIEnv * env, jobject object, jlong jointId) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- return joint->getDampingOrthoLin();
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: setDampingOrthoLin
- * Signature: (JF)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setDampingOrthoLin
- (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- joint->setDampingOrthoLin(value);
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: getSoftnessOrthoAng
- * Signature: (J)F
- */
- JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getSoftnessOrthoAng
- (JNIEnv * env, jobject object, jlong jointId) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- return joint->getSoftnessOrthoAng();
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: setSoftnessOrthoAng
- * Signature: (JF)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setSoftnessOrthoAng
- (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- joint->setSoftnessOrthoAng(value);
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: getRestitutionOrthoAng
- * Signature: (J)F
- */
- JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getRestitutionOrthoAng
- (JNIEnv * env, jobject object, jlong jointId) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- return joint->getRestitutionOrthoAng();
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: setRestitutionOrthoAng
- * Signature: (JF)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setRestitutionOrthoAng
- (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- joint->setRestitutionOrthoAng(value);
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: getDampingOrthoAng
- * Signature: (J)F
- */
- JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getDampingOrthoAng
- (JNIEnv * env, jobject object, jlong jointId) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- return joint->getDampingOrthoAng();
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: setDampingOrthoAng
- * Signature: (JF)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setDampingOrthoAng
- (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- joint->setDampingOrthoAng(value);
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: isPoweredLinMotor
- * Signature: (J)Z
- */
- JNIEXPORT jboolean JNICALL Java_com_jme3_bullet_joints_SliderJoint_isPoweredLinMotor
- (JNIEnv * env, jobject object, jlong jointId) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return false;
- }
- return joint->getPoweredLinMotor();
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: setPoweredLinMotor
- * Signature: (JZ)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setPoweredLinMotor
- (JNIEnv * env, jobject object, jlong jointId, jboolean value) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- joint->setPoweredLinMotor(value);
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: getTargetLinMotorVelocity
- * Signature: (J)F
- */
- JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getTargetLinMotorVelocity
- (JNIEnv * env, jobject object, jlong jointId) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- return joint->getTargetLinMotorVelocity();
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: setTargetLinMotorVelocity
- * Signature: (JF)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setTargetLinMotorVelocity
- (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- joint->setTargetLinMotorVelocity(value);
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: getMaxLinMotorForce
- * Signature: (J)F
- */
- JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getMaxLinMotorForce
- (JNIEnv * env, jobject object, jlong jointId) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- return joint->getMaxLinMotorForce();
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: setMaxLinMotorForce
- * Signature: (JF)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setMaxLinMotorForce
- (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- joint->setMaxLinMotorForce(value);
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: isPoweredAngMotor
- * Signature: (J)Z
- */
- JNIEXPORT jboolean JNICALL Java_com_jme3_bullet_joints_SliderJoint_isPoweredAngMotor
- (JNIEnv * env, jobject object, jlong jointId) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return false;
- }
- return joint->getPoweredAngMotor();
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: setPoweredAngMotor
- * Signature: (JZ)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setPoweredAngMotor
- (JNIEnv * env, jobject object, jlong jointId, jboolean value) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- joint->setPoweredAngMotor(value);
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: getTargetAngMotorVelocity
- * Signature: (J)F
- */
- JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getTargetAngMotorVelocity
- (JNIEnv * env, jobject object, jlong jointId) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- return joint->getTargetAngMotorVelocity();
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: setTargetAngMotorVelocity
- * Signature: (JF)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setTargetAngMotorVelocity
- (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- joint->setTargetAngMotorVelocity(value);
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: getMaxAngMotorForce
- * Signature: (J)F
- */
- JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getMaxAngMotorForce
- (JNIEnv * env, jobject object, jlong jointId) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return 0;
- }
- return joint->getMaxAngMotorForce();
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: setMaxAngMotorForce
- * Signature: (JF)V
- */
- JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setMaxAngMotorForce
- (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
- btSliderConstraint* joint = reinterpret_cast(jointId);
- if (joint == NULL) {
- jclass newExc = env->FindClass("java/lang/NullPointerException");
- env->ThrowNew(newExc, "The native object does not exist.");
- return;
- }
- joint->setMaxAngMotorForce(value);
- }
-
- /*
- * Class: com_jme3_bullet_joints_SliderJoint
- * Method: createJoint
- * Signature: (JJLcom/jme3/math/Vector3f;Lcom/jme3/math/Matrix3f;Lcom/jme3/math/Vector3f;Lcom/jme3/math/Matrix3f;Z)J
- */
- JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_SliderJoint_createJoint
- (JNIEnv * env, jobject object, jlong bodyIdA, jlong bodyIdB, jobject pivotA, jobject rotA, jobject pivotB, jobject rotB, jboolean useLinearReferenceFrameA) {
- jmeClasses::initJavaClasses(env);
- btRigidBody* bodyA = reinterpret_cast