# Shapes

The simplest type of Meshes are jME's default Shapes. You can use Shapes to build complex Geometries. Shapes are created without using the AssetManager.

3D shapes:

- com.jme3.scene.shape.Sphere – A ball or elipsoid.
- com.jme3.scene.shape.Box – A cube or cuboid.
- com.jme3.scene.shape.Cylinder – A disk or pillar.
- com.jme3.scene.shape.Dome – Half a sphere.
- com.jme3.scene.shape.Torus – An single-holed torus (“donut”).
- com.jme3.scene.shape.PQTorus – A parameterized torus, also known as PQ torus. Looks like a
  .

Non-3D shapes:

- com.jme3.scene.shape.Quad – A flat 2D rectangle (has two sides)
- com.jme3.scene.shape.Line – A 1D line (has a length)
- come.jme3.math.Ray – A 1D line (has length, direction, start point, but no end)

## Usage

To add a shape to the scene:

1. Create the base mesh shape
2. Wrap it into a Geometry
3. Attach the Geometry to the rootNode to make it visible.

    Sphere sphereMesh = new Sphere(32, 32, 10, false, true);
    Geometry sphere = new Geometry("Sky", sphereMesh);
    rootNode.attachChild(sphere);

view online version