import javax.media.j3d.*;
import javax.vecmath.*;

public class testGeom extends  Object
{
 private static final float[] coords =
 {
  //bottom
  1.0f,1.0f,0.0f,
  -1.0f,1.0f,0.0f,
  -1.0f,-1.0f,0.0f,
  1.0f,-1.0f,0.0f,
  //top
  2.0f,2.0f,1.0f,
  -2.0f,2.0f,1.0f,
  -2.0f,-2.0f,1.0f,
  2.0f,-2.0f,1.0f,
  //right hand side
  1.0f,1.0f,0.0f,
  2.0f,2.0f,1.0f,
  2.0f,-2.0f,1.0f,
  1.0f,-1.0f,0.0f,
  //the back side
  1.0f,1.0f,0.0f,
  2.0f,2.0f,1.0f,
  -2.0f,2.0f,1.0f,
  -1.0f,1.0f,0.0f,
  //the left side
  -1.0f,1.0f,0.0f,
  -2.0f,2.0f,1.0f,
  -1.0f,-1.0f,0.0f,
  -2.0f,-2.0f,1.0f,
  //the front side
  -1.0f,-1.0f,0.0f,
  -2.0f,-2.0f,1.0f,
  1.0f,-1.0f,0.0f,
  2.0f,-2.0f,1.0f,
 };

    private static final float[] colors = {
	// front face (red)
	1.0f, 0.0f, 0.0f,
	1.0f, 0.0f, 0.0f,
	1.0f, 0.0f, 0.0f,
	1.0f, 0.0f, 0.0f,
	// back face (green)
	0.0f, 1.0f, 0.0f,
	0.0f, 1.0f, 0.0f,
	0.0f, 1.0f, 0.0f,
	0.0f, 1.0f, 0.0f,
	// right face (blue)
	0.0f, 0.0f, 1.0f,
	0.0f, 0.0f, 1.0f,
	0.0f, 0.0f, 1.0f,
	0.0f, 0.0f, 1.0f,
	// left face (yellow)
	1.0f, 1.0f, 0.0f,
	1.0f, 1.0f, 0.0f,
	1.0f, 1.0f, 0.0f,
	1.0f, 1.0f, 0.0f,
	// top face (magenta)
	1.0f, 0.0f, 1.0f,
	1.0f, 0.0f, 1.0f,
	1.0f, 0.0f, 1.0f,
	1.0f, 0.0f, 1.0f,
	// bottom face (cyan)
	0.0f, 1.0f, 1.0f,
	0.0f, 1.0f, 1.0f,
	0.0f, 1.0f, 1.0f,
	0.0f, 1.0f, 1.0f,
    };

 private Shape3D shape;  
 public testGeom()
 {
  QuadArray cube = new QuadArray( 24, QuadArray.COORDINATES | QuadArray.COLOR_3 );

  cube.setCoordinates( 0, coords );
  cube.setColor( 0, colors );
  shape = new Shape3D( cube, new Appearance() );
 }
 public Shape3D getShape()
 {
   return shape;
 }
  
}
 