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:

Non-3D shapes:

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