public final class
ShapeFactory
Utility class used to dynamically construct ModelRenderable
s 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 |
makeCylinder(float radius, float height, Vector3 center, Material material)
Creates a
ModelRenderable in the shape of a cylinder 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 makeCylinder (float radius, float height, Vector3 center, Material material)
Creates a ModelRenderable
in the shape of a cylinder with the give specifications.
Parameters
radius | the radius of the constructed cylinder |
---|---|
height | the height of the constructed cylinder |
center | the center of the constructed cylinder |
material | the material to use for rendering the cylinder |
Returns
- renderable representing a cylinder 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