public class Cube2 extends Cube
(±1, ±1, ±1)
.
This version of the cube model has each face of the cube cut up by an n by m grid of lines.
Here is a picture showing how the cube's eight corners are labeled.
v[4]
+-----------------+ v[5]
/| /|
/ | / |
/ | / |
/ | / |
v[7] +-----------------+ v[6] |
| | | | y
| | | | |
| | | | |
| v[0] +---------|-------+ v[1] |
| / | / |
| / | / +----. x
| / | / /
|/ |/ /
+-----------------+ /
v[3] v[2] z
hidden, lineSegmentList
Constructor and Description |
---|
Cube2()
Create a cube with its center at the origin, having edge
length 2, with its corners at
(±1, ±1, ±1) . |
Cube2(int xGrid,
int yGrid,
int zGrid)
Create a cube with its center at the origin, having edge
length 2, with its corners at
(±1, ±1, ±1) , and
with each of the cube's faces containing the given number
of grid lines parallel to the x, y, and z directions. |
public Cube2()
(±1, ±1, ±1)
. and
with two perpendicular grid lines going across the middle
of each of the cube's faces.public Cube2(int xGrid, int yGrid, int zGrid)
(±1, ±1, ±1)
, and
with each of the cube's faces containing the given number
of grid lines parallel to the x, y, and z directions.xGrid
- number of grid lines perpendicular to the x-axisyGrid
- number of grid lines perpendicular to the y-axiszGrid
- number of grid lines perpendicular to the z-axis