<Fundamental Shapes|User's Guide|Cylinder>
See Box
Box provides a TriMesh that is an enclosed shape with six sides that are Axis-aligned. The Box generated is based upon a number of possible criteria, first a minimum and maximum point. All eight points are generated from these two points. Secondly, you may provide the box with a center point and a number of extents from that center for each axis.
(Boxes actually have 24 vertexex, not 8: 3 vertexes at each corner. This is so that each box corner can have different material properties for each of the three faces that it intersects. For single-material boxes, an 8-vertex box would be more efficient.).
//We will create a box with sides of length 10 and will be centered //about the origin. Vector3f min = new Vector3f(-5, -5, -5); Vector3f max = new Vector3f(5, 5, 5); Box b = new Box("box", min, max); //Let's change the box size //Making it twice as wide Vector3f min2 = new Vector3f(-10, -5, -5); Vector3f max2 = new Vector3f(10, 5, 5); b.setData(min2, max2);