private CollisionShape createShape(Transform vertexToShape, Vector3f center,
            VectorSet vertexLocations) {
        int numVectors = vertexLocations.numVectors();
        assert numVectors > 0 : numVectors;

        Vector3f tempLocation = new Vector3f();
        int numPoints = vertexLocations.numVectors();
        float points[] = new float[3 * numPoints];
        FloatBuffer buffer = vertexLocations.toBuffer();
        buffer.rewind();
        int floatIndex = 0;
        while (buffer.hasRemaining()) {
            tempLocation.x = buffer.get();
            tempLocation.y = buffer.get();
            tempLocation.z = buffer.get();
            /*
             * Translate so that vertex coordinates are relative to
             * the shape's center.
             */
            tempLocation.subtractLocal(center);
            /*
             * Transform vertex coordinates to de-scaled shape coordinates.
             */
            vertexToShape.transformVector(tempLocation, tempLocation);
            points[floatIndex] = tempLocation.x;
            points[floatIndex + 1] = tempLocation.y;
            points[floatIndex + 2] = tempLocation.z;
            floatIndex += 3;
        }

        CollisionShape result = new HullCollisionShape(points);

        return result;
    }
Create a CollisionShape for the specified transform, center, and vertex
locations.

@param vertexToShape the transform from vertex coordinates to de-scaled
shape coordinates (not null, unaffected)
@param center the location of the shape's center, in vertex coordinates
(not null, unaffected)
@param vertexLocations the set of vertex locations (not null, not empty,
TRASHED)
@return a new CollisionShape
jme3-jbullet/src/main/java/com/jme3/bullet/animation/DacLinks.java