Box
Description

This is the simplest of the 3D shapes, a simple axis aligned box with user definable width (x-axis), height (y-axis) and depth (z-axis).
Parts
The box has six sides and when first created each side has a different colour. Each side can have its own drawmode so there is virtually no limit to the range of render combinations for a box.
Description | Number | Named bit-flag |
---|---|---|
Bottom face Top face Front face Back face Left face Right face |
0 1 2 3 4 5 |
S3D.BOTTOM S3D.TOP S3D.FRONT S3D.BACK S3D.LEFT S3D.RIGHT |
Model View Orientation

By default the model view origin is at the geometric centre of the box. This picture shows the origin and the X (red), Y (green) and (Z) axes. Notice that the poistive Y direction is down, this is the opposite of OpenGL but Processing chose this to make it easier for sketchers to move between 2D and 3D,
Creating a Box
Constructors | |
---|---|
|
|
Parameter | Comments |
|
width, height and depth |
|
Allows the user to specify another model view orienation for this shape. See Orientation guide. |