use of com.bulletphysics.collision.shapes.ConvexHullShape in project jmonkeyengine by jMonkeyEngine.
the class HullCollisionShape method createShape.
protected void createShape(float[] points) {
ObjectArrayList<Vector3f> pointList = new ObjectArrayList<Vector3f>();
for (int i = 0; i < points.length; i += 3) {
pointList.add(new Vector3f(points[i], points[i + 1], points[i + 2]));
}
cShape = new ConvexHullShape(pointList);
cShape.setLocalScaling(Converter.convert(getScale()));
cShape.setMargin(margin);
}
Aggregations