ShapeFactory

public final class ShapeFactory

Utility class used to dynamically construct ModelRenderables for various shapes.

Public Constructors

Public Methods

static ModelRenderable
makeCube(Vector3 size, Vector3 center, Material material)
Creates a ModelRenderable in the shape of a cube with the give specifications.
static ModelRenderable
makeSphere(float radius, Vector3 center, Material material)
Creates a ModelRenderable in the shape of a sphere with the give specifications.

Inherited Methods

Public Constructors

public ShapeFactory ()

Public Methods

public static ModelRenderable makeCube (Vector3 size, Vector3 center, Material material)

Creates a ModelRenderable in the shape of a cube with the give specifications.

Parameters
size the size of the constructed cube
center the center of the constructed cube
material the material to use for rendering the cube
Returns
  • renderable representing a cube with the given parameters

public static ModelRenderable makeSphere (float radius, Vector3 center, Material material)

Creates a ModelRenderable in the shape of a sphere with the give specifications.

Parameters
radius the radius of the constructed sphere
center the center of the constructed sphere
material the material to use for rendering the sphere
Returns
  • renderable representing a sphere with the given parameters

Send feedback about...