/*
 * Copyright 2017 MovingBlocks
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.terasology.physics.shapes;

import org.terasology.math.geom.Vector3f;

import java.util.List;

public interface CollisionShapeFactory {
    BoxShape getNewBox(Vector3f extents);

    ConvexHullShape getNewConvexHull(List<Vector3f> vertices);

    default BoxShape getNewUnitCube() {
        return getNewBox(Vector3f.one());
    }

    CompoundShape getNewCompoundShape();

    SphereShape getNewSphere(float radius);
}

@@ -701,286 +701,1082 @@
 t;%0A%0A
-public interface CollisionShapeFactory %7B%0A    BoxShape getNewBox(Vector3f extents);%0A%0A    ConvexHullShape getNewConvexHull(List%3CVector3f%3E vertices);%0A%0A    default BoxShape getNewUnitCube() %7B%0A        return getNewBox(Vector3f.one());%0A    %7D%0A%0A    CompoundShape getNewCompoundShape();%0A
+/**%0A * Factory interface to create new collision shapes.%0A */%0Apublic interface CollisionShapeFactory %7B%0A    /**%0A     * Creates a new box shape with the given extents.%0A     * @param extents The full extents of the box shape.%0A     * @return The box shape.%0A     */%0A    BoxShape getNewBox(Vector3f extents);%0A%0A    /**%0A     * Creates a new convex hull shape with the given vertices.%0A     * @param vertices The vertices of the convex hull shape.%0A     * @return The convex hull shape.%0A     */%0A    ConvexHullShape getNewConvexHull(List%3CVector3f%3E vertices);%0A%0A    /**%0A     * Creates a new box shape with unit extents, that is a cube with sides of length 1.%0A     * @return The unit cube box shape.%0A     */%0A    default BoxShape getNewUnitCube() %7B%0A        return getNewBox(Vector3f.one());%0A    %7D%0A%0A    /**%0A     * Creates a new empty compound shape.%0A     * @return The empty compound shape.%0A     */%0A    CompoundShape getNewCompoundShape();%0A%0A    /**%0A     * Creates a new sphere shape with the given radius.%0A     * @param radius The radius of the shape.%0A     * @return The sphere shape.%0A     */
 %0A   

Document CollisionShapeFactory