public class Cube4 extends Cube
(±1, ±1, ±1)
.
This version of the cube model has the top and bottom faces of the cube cut up by a triangle fan and the front, back, right, and left faces cut up by a grid of perpendicular 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 |
---|
Cube4()
Create a cube with its center at the origin, having edge
length 2, with its corners at
(±1, ±1, ±1) . |
Cube4(int xCount,
int yGrid,
int zCount)
Create a cube with its center at the origin, having edge
length 2, with its corners at
(±1, ±1, ±1) , and
with the top and bottom faces containing a triangle fan
with the given number of triangles along each of the x,
and z directions. |
public Cube4()
(±1, ±1, ±1)
. with
a triangle fan of eight triangles in top and bottom faces,
and two perpendicular lines cutting each of the front,
back, right, and left faces.public Cube4(int xCount, int yGrid, int zCount)
(±1, ±1, ±1)
, and
with the top and bottom faces containing a triangle fan
with the given number of triangles along each of the x,
and z directions.
There must be at least one triangle along the x and z directions.
xCount
- number of triangles along the x-directionyGrid
- number of grid lines perpendicular to the y-axiszCount
- number of triangles along the z-direction