Class Quad

All Implemented Interfaces:
IMultiColorable, ISingleColorable, IGLRenderer, ISortableDraw
Direct Known Subclasses:
TranslucentQuad

public class Quad extends Polygon
A Quad extends a Polygon in order to provide a specific
invalid @link
draw()
method that relies on a dedicated GL2 call (GL_QUADS), and to ensure the number of points is never greater than 4.
Author:
Martin Pernollet
  • Constructor Details

    • Quad

      public Quad()
      Initializes an empty Quad with face status defaulting to true, and wireframe status defaulting to false.
  • Method Details

    • begin

      protected void begin(IPainter painter)
      Description copied from class: Geometry
      Invoke GL begin with the actual geometry type
      invalid @link
      GL#GL_POINTS
      ,
      invalid @link
      GL#GL_LINES
      ,
      invalid @link
      GL#GL_TRIANGLES
      ,
      invalid @link
      GL2#GL_POLYGON
      ...
      Overrides:
      begin in class Polygon
    • add

      public void add(Point point)
      Add a point to the polygon.
      Overrides:
      add in class Geometry
    • toString

      public String toString(int depth)
      Overrides:
      toString in class Geometry