From previous chapters you remember that a scene is made up of spatials. A spatial can either be an invisible node, or a visible geometry. Have another look at the following two lines from our WireframeShapes.java
example:
Box mesh = new Box(Vector3f.ZERO, 1, 1, 1); Geometry geom = new Geometry("Box", mesh);
You notice that the magic ingredient that makes a geometry visible is a polygon mesh: first you create a mesh shape (here the box), then you wrap the geometry object around it. The advantage is that you can reuse the same mesh in several geometries.
The mesh data type is just a shape—pure, unaltered vertex data. The com.jme3.scene.Geometry
data type combines the inner mesh, the surface material, and transformations into one object. When a mesh is used in a geometry, the geometry's transformations (position, scale, rotation) and material (for example its color) are applied to the mesh. This combination makes it a visible element of the 3D scene.
The jMonkeyEngine class...