- issue warning on unscalable collision shapes

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10352 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 12 years ago
parent 63ee4d8bbe
commit 12771f839f
  1. 9
      engine/src/bullet/com/jme3/bullet/collision/shapes/CapsuleCollisionShape.java
  2. 8
      engine/src/bullet/com/jme3/bullet/collision/shapes/CylinderCollisionShape.java
  3. 9
      engine/src/bullet/com/jme3/bullet/collision/shapes/SphereCollisionShape.java
  4. 11
      engine/src/jbullet/com/jme3/bullet/collision/shapes/CapsuleCollisionShape.java
  5. 10
      engine/src/jbullet/com/jme3/bullet/collision/shapes/CylinderCollisionShape.java
  6. 11
      engine/src/jbullet/com/jme3/bullet/collision/shapes/SphereCollisionShape.java

@ -35,6 +35,7 @@ import com.jme3.export.InputCapsule;
import com.jme3.export.JmeExporter;
import com.jme3.export.JmeImporter;
import com.jme3.export.OutputCapsule;
import com.jme3.math.Vector3f;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
@ -87,6 +88,14 @@ public class CapsuleCollisionShape extends CollisionShape{
return axis;
}
/**
* WARNING - CompoundCollisionShape scaling has no effect.
*/
@Override
public void setScale(Vector3f scale) {
Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "CapsuleCollisionShape cannot be scaled");
}
public void write(JmeExporter ex) throws IOException {
super.write(ex);
OutputCapsule capsule = ex.getCapsule(this);

@ -81,6 +81,14 @@ public class CylinderCollisionShape extends CollisionShape {
return axis;
}
/**
* WARNING - CompoundCollisionShape scaling has no effect.
*/
@Override
public void setScale(Vector3f scale) {
Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "CylinderCollisionShape cannot be scaled");
}
public void write(JmeExporter ex) throws IOException {
super.write(ex);
OutputCapsule capsule = ex.getCapsule(this);

@ -35,6 +35,7 @@ import com.jme3.export.InputCapsule;
import com.jme3.export.JmeExporter;
import com.jme3.export.JmeImporter;
import com.jme3.export.OutputCapsule;
import com.jme3.math.Vector3f;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
@ -76,6 +77,14 @@ public class SphereCollisionShape extends CollisionShape {
createShape();
}
/**
* WARNING - CompoundCollisionShape scaling has no effect.
*/
@Override
public void setScale(Vector3f scale) {
Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "SphereCollisionShape cannot be scaled");
}
protected void createShape() {
objectId = createShape(radius);
Logger.getLogger(this.getClass().getName()).log(Level.FINE, "Created Shape {0}", Long.toHexString(objectId));

@ -39,7 +39,10 @@ import com.jme3.export.InputCapsule;
import com.jme3.export.JmeExporter;
import com.jme3.export.JmeImporter;
import com.jme3.export.OutputCapsule;
import com.jme3.math.Vector3f;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* Basic capsule collision shape
@ -91,6 +94,14 @@ public class CapsuleCollisionShape extends CollisionShape{
return axis;
}
/**
* WARNING - CompoundCollisionShape scaling has no effect.
*/
@Override
public void setScale(Vector3f scale) {
Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "CapsuleCollisionShape cannot be scaled");
}
public void write(JmeExporter ex) throws IOException {
super.write(ex);
OutputCapsule capsule = ex.getCapsule(this);

@ -41,6 +41,8 @@ import com.jme3.export.JmeImporter;
import com.jme3.export.OutputCapsule;
import com.jme3.math.Vector3f;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* Basic cylinder collision shape
@ -83,6 +85,14 @@ public class CylinderCollisionShape extends CollisionShape {
return axis;
}
/**
* WARNING - CompoundCollisionShape scaling has no effect.
*/
@Override
public void setScale(Vector3f scale) {
Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "CylinderCollisionShape cannot be scaled");
}
public void write(JmeExporter ex) throws IOException {
super.write(ex);
OutputCapsule capsule = ex.getCapsule(this);

@ -37,7 +37,10 @@ import com.jme3.export.InputCapsule;
import com.jme3.export.JmeExporter;
import com.jme3.export.JmeImporter;
import com.jme3.export.OutputCapsule;
import com.jme3.math.Vector3f;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* Basic sphere collision shape
@ -63,6 +66,14 @@ public class SphereCollisionShape extends CollisionShape {
return radius;
}
/**
* WARNING - CompoundCollisionShape scaling has no effect.
*/
@Override
public void setScale(Vector3f scale) {
Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "SphereCollisionShape cannot be scaled");
}
public void write(JmeExporter ex) throws IOException {
super.write(ex);
OutputCapsule capsule = ex.getCapsule(this);

Loading…
Cancel
Save