Class EnlightablePolygon

All Implemented Interfaces:
IGLRenderer, ISortableDraw

public class EnlightablePolygon extends AbstractEnlightable
  • Field Details

  • Constructor Details

    • EnlightablePolygon

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

    • 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
    • applyGeometryTransform

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

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

      protected void updateCenter()
    • add

      public void add(Point point)
      Add a point to the polygon.
    • hasAlpha

      public boolean hasAlpha()
    • getBarycentre

      public Coord3d getBarycentre()
      Description copied from class: Drawable
      Return the barycentre of this object, which is computed as the center of its bounding box. If the bounding box is not available, the returned value is
      invalid @link
      Coord3d.INVALID
      Overrides:
      getBarycentre in class Drawable
      Returns:
      the center of the bounding box, or
      invalid @link
      Coord3d.INVALID
      .
    • get

      public Point get(int p)
      Retrieve a point from the Polygon.
      Returns:
      a Point3d.
    • size

      public int size()
      Indicates the number of points in this Polygon.
      Returns:
      the number of points
    • setColorMapper

      public void setColorMapper(ColorMapper mapper)
    • getColorMapper

      public ColorMapper getColorMapper()
    • setColor

      public void setColor(Color color)
    • getColor

      public Color getColor()
    • toString

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