Search in sources :

Example 1 with ConeShapeZ

use of com.bulletphysics.collision.shapes.ConeShapeZ in project jmonkeyengine by jMonkeyEngine.

the class ConeCollisionShape method createShape.

protected void createShape() {
    if (axis == PhysicsSpace.AXIS_X) {
        cShape = new ConeShapeX(radius, height);
    } else if (axis == PhysicsSpace.AXIS_Y) {
        cShape = new ConeShape(radius, height);
    } else if (axis == PhysicsSpace.AXIS_Z) {
        cShape = new ConeShapeZ(radius, height);
    } else {
        throw new UnsupportedOperationException("Unexpected axis: " + axis);
    }
    cShape.setLocalScaling(Converter.convert(getScale()));
    cShape.setMargin(margin);
}
Also used : ConeShapeZ(com.bulletphysics.collision.shapes.ConeShapeZ) ConeShape(com.bulletphysics.collision.shapes.ConeShape) ConeShapeX(com.bulletphysics.collision.shapes.ConeShapeX)

Aggregations

ConeShape (com.bulletphysics.collision.shapes.ConeShape)1 ConeShapeX (com.bulletphysics.collision.shapes.ConeShapeX)1 ConeShapeZ (com.bulletphysics.collision.shapes.ConeShapeZ)1