public static Mesh getDebugMesh(CollisionShape shape) {
        Mesh mesh = null;
        if (shape.getCShape() instanceof ConvexShape) {
            mesh = new Mesh();
            mesh.setBuffer(Type.Position, 3, getVertices((ConvexShape) shape.getCShape()));
            mesh.getFloatBuffer(Type.Position).clear();
        } else if (shape.getCShape() instanceof ConcaveShape) {
            mesh = new Mesh();
            mesh.setBuffer(Type.Position, 3, getVertices((ConcaveShape) shape.getCShape()));
            mesh.getFloatBuffer(Type.Position).clear();
        }
        return mesh;
    }
Creates a debug shape from the given collision shape. This is mostly used internally.<br>
To attach a debug shape to a physics object, call <code>attachDebugShape(AssetManager manager);</code> on it.

@param collisionShape the CollisionShape to use or null
@return a new Spatial or null
jme3-jbullet/src/main/java/com/jme3/bullet/util/DebugShapeFactory.java