AI-generated Key Takeaways
- 
          The ShapeFactoryis a utility class for dynamically creatingModelRenderableobjects representing basic shapes.
- 
          It provides methods to create cubes, cylinders, and spheres with specified dimensions, center points, and materials. 
- 
          These methods ( makeCube,makeCylinder,makeSphere) return aModelRenderablethat can be used to display the shape in an AR scene.
- 
          Each shape's creation requires specifying size or radius, center position, and the desired material for rendering. 
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  ModelRenderablein the shape of a cube with the give specifications. | 
| static ModelRenderable | 
                makeCylinder(float radius, float height, Vector3 center, Material material)
                 Creates a  ModelRenderablein the shape of a cylinder with the give specifications. | 
| static ModelRenderable | 
                makeSphere(float radius, Vector3 center, Material material)
                 Creates a  ModelRenderablein 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