- issue warning on unscalable collision shapes
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10352 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
63ee4d8bbe
commit
12771f839f
@ -35,6 +35,7 @@ import com.jme3.export.InputCapsule;
|
|||||||
import com.jme3.export.JmeExporter;
|
import com.jme3.export.JmeExporter;
|
||||||
import com.jme3.export.JmeImporter;
|
import com.jme3.export.JmeImporter;
|
||||||
import com.jme3.export.OutputCapsule;
|
import com.jme3.export.OutputCapsule;
|
||||||
|
import com.jme3.math.Vector3f;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
@ -87,6 +88,14 @@ public class CapsuleCollisionShape extends CollisionShape{
|
|||||||
return axis;
|
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 {
|
public void write(JmeExporter ex) throws IOException {
|
||||||
super.write(ex);
|
super.write(ex);
|
||||||
OutputCapsule capsule = ex.getCapsule(this);
|
OutputCapsule capsule = ex.getCapsule(this);
|
||||||
|
@ -81,6 +81,14 @@ public class CylinderCollisionShape extends CollisionShape {
|
|||||||
return axis;
|
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 {
|
public void write(JmeExporter ex) throws IOException {
|
||||||
super.write(ex);
|
super.write(ex);
|
||||||
OutputCapsule capsule = ex.getCapsule(this);
|
OutputCapsule capsule = ex.getCapsule(this);
|
||||||
|
@ -35,6 +35,7 @@ import com.jme3.export.InputCapsule;
|
|||||||
import com.jme3.export.JmeExporter;
|
import com.jme3.export.JmeExporter;
|
||||||
import com.jme3.export.JmeImporter;
|
import com.jme3.export.JmeImporter;
|
||||||
import com.jme3.export.OutputCapsule;
|
import com.jme3.export.OutputCapsule;
|
||||||
|
import com.jme3.math.Vector3f;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
@ -76,6 +77,14 @@ public class SphereCollisionShape extends CollisionShape {
|
|||||||
createShape();
|
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() {
|
protected void createShape() {
|
||||||
objectId = createShape(radius);
|
objectId = createShape(radius);
|
||||||
Logger.getLogger(this.getClass().getName()).log(Level.FINE, "Created Shape {0}", Long.toHexString(objectId));
|
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.JmeExporter;
|
||||||
import com.jme3.export.JmeImporter;
|
import com.jme3.export.JmeImporter;
|
||||||
import com.jme3.export.OutputCapsule;
|
import com.jme3.export.OutputCapsule;
|
||||||
|
import com.jme3.math.Vector3f;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Basic capsule collision shape
|
* Basic capsule collision shape
|
||||||
@ -91,6 +94,14 @@ public class CapsuleCollisionShape extends CollisionShape{
|
|||||||
return axis;
|
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 {
|
public void write(JmeExporter ex) throws IOException {
|
||||||
super.write(ex);
|
super.write(ex);
|
||||||
OutputCapsule capsule = ex.getCapsule(this);
|
OutputCapsule capsule = ex.getCapsule(this);
|
||||||
|
@ -41,6 +41,8 @@ import com.jme3.export.JmeImporter;
|
|||||||
import com.jme3.export.OutputCapsule;
|
import com.jme3.export.OutputCapsule;
|
||||||
import com.jme3.math.Vector3f;
|
import com.jme3.math.Vector3f;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Basic cylinder collision shape
|
* Basic cylinder collision shape
|
||||||
@ -83,6 +85,14 @@ public class CylinderCollisionShape extends CollisionShape {
|
|||||||
return axis;
|
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 {
|
public void write(JmeExporter ex) throws IOException {
|
||||||
super.write(ex);
|
super.write(ex);
|
||||||
OutputCapsule capsule = ex.getCapsule(this);
|
OutputCapsule capsule = ex.getCapsule(this);
|
||||||
|
@ -37,7 +37,10 @@ import com.jme3.export.InputCapsule;
|
|||||||
import com.jme3.export.JmeExporter;
|
import com.jme3.export.JmeExporter;
|
||||||
import com.jme3.export.JmeImporter;
|
import com.jme3.export.JmeImporter;
|
||||||
import com.jme3.export.OutputCapsule;
|
import com.jme3.export.OutputCapsule;
|
||||||
|
import com.jme3.math.Vector3f;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Basic sphere collision shape
|
* Basic sphere collision shape
|
||||||
@ -63,6 +66,14 @@ public class SphereCollisionShape extends CollisionShape {
|
|||||||
return radius;
|
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 {
|
public void write(JmeExporter ex) throws IOException {
|
||||||
super.write(ex);
|
super.write(ex);
|
||||||
OutputCapsule capsule = ex.getCapsule(this);
|
OutputCapsule capsule = ex.getCapsule(this);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user