Class ColorCube


public class ColorCube extends Shape3D
Simple color-per-vertex cube with a different color for each face
  • Constructor Details

    • ColorCube

      public ColorCube()
      Constructs a color cube with unit scale. The corners of the color cube are [-1,-1,-1] and [1,1,1].
    • ColorCube

      public ColorCube(double scale)
      Constructs a color cube with the specified scale. The corners of the color cube are [-scale,-scale,-scale] and [scale,scale,scale].
      Parameters:
      scale - the scale of the cube
  • Method Details

    • getShape

      public Shape3D getShape()
      Deprecated.
      ColorCube now extends shape so it is no longer necessary to call this method.
    • getScale

      public double getScale()
      Returns the scale of the Cube
      Since:
      Java 3D 1.2.1