Class CubeGLUT

All Implemented Interfaces:
ISingleColorable, IGLRenderer, ISortableDraw

public class CubeGLUT extends Wireframeable implements ISingleColorable
A cube rendered with OpenGL GLUT. GLUT helps fully defining cube with normals, which makes this cube suitable for usage with a Light.
Author:
Martin Pernollet
  • Field Details

    • radius

      protected float radius
    • color

      protected Color color
    • position

      protected Coord3d position
  • Constructor Details

  • Method Details

    • setColor

      public void setColor(Color color)
      Description copied from interface: ISingleColorable
      Set the color.
      Specified by:
      setColor in interface ISingleColorable
      Parameters:
      color - the color
    • getColor

      public Color getColor()
      Description copied from interface: ISingleColorable
      Get the color.
      Specified by:
      getColor in interface ISingleColorable
      Returns:
      color the color.
    • getRadius

      public float getRadius()
    • setRadius

      public void setRadius(float radius)
    • getPosition

      public Coord3d getPosition()
    • setPosition

      public void setPosition(Coord3d position)
    • draw

      public void draw(IPainter painter)
      Description copied from class: Drawable
      Call OpenGL2 routines for rendering the object.
      Specified by:
      draw in interface IGLRenderer
      Specified by:
      draw in class Drawable
    • doDrawCube

      protected void doDrawCube(IPainter painter)
    • applyGeometryTransform

      public void applyGeometryTransform(Transform transform)
      Specified by:
      applyGeometryTransform in class Drawable
    • updateBounds

      public void updateBounds()
      Specified by:
      updateBounds in class Drawable